diff options
| author | Emma <4430224+justiceenunciate@users.noreply.github.com> | 2024-10-06 00:57:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-06 08:57:55 +0800 |
| commit | 8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc (patch) | |
| tree | 18a20382cd87975ef6b0b2c1c30a4bc7ac1447e6 /lua/lspconfig/configs/fennel_ls.lua | |
| parent | refactor: remove unnecessary code (diff) | |
| download | nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.tar nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.tar.gz nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.tar.bz2 nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.tar.lz nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.tar.xz nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.tar.zst nvim-lspconfig-8f6bdd213247ecdc88e5061904bfbf2e6a5e35cc.zip | |
fix(fennel-ls): use closest cfg as root directory and fallback to git repo root (#3325)
Co-authored-by: Emma <emma@guugle.com>
Diffstat (limited to 'lua/lspconfig/configs/fennel_ls.lua')
| -rw-r--r-- | lua/lspconfig/configs/fennel_ls.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/lspconfig/configs/fennel_ls.lua b/lua/lspconfig/configs/fennel_ls.lua index aa4f643b..f125d54f 100644 --- a/lua/lspconfig/configs/fennel_ls.lua +++ b/lua/lspconfig/configs/fennel_ls.lua @@ -5,7 +5,10 @@ return { cmd = { 'fennel-ls' }, filetypes = { 'fennel' }, root_dir = function(dir) - return util.find_git_ancestor(dir) + local has_fls_project_cfg = function(path) + return util.path.is_file(vim.fs.joinpath(path, 'flsproject.fnl')) + end + return util.search_ancestors(dir, has_fls_project_cfg) or vim.fs.root(0, '.git') end, settings = {}, capabilities = { @@ -17,6 +20,9 @@ return { https://sr.ht/~xerool/fennel-ls/ A language server for fennel. + +fennel-ls is configured using the closest file to your working directory named `flsproject.fnl`. +All fennel-ls configuration options [can be found here](https://git.sr.ht/~xerool/fennel-ls/tree/HEAD/docs/manual.md#configuration). ]], }, } |
