diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-02-04 12:22:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 12:22:43 -0800 |
| commit | fe0c839afd8f5aad6f8fd14811ebc5171c3a4869 (patch) | |
| tree | 7dc87648afc76527be2978a37b77b73d24ef01b7 /lua | |
| parent | Merge pull request #712 from glepnir/glepnir-patch-1 (diff) | |
| parent | nimls: Use buffer directory as fallback instead of $HOME (diff) | |
| download | nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.tar nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.tar.gz nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.tar.bz2 nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.tar.lz nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.tar.xz nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.tar.zst nvim-lspconfig-fe0c839afd8f5aad6f8fd14811ebc5171c3a4869.zip | |
Merge pull request #719 from lithammer/nimlsp-root-dir
nimls: root_dir improvements
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/nimls.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/lspconfig/nimls.lua b/lua/lspconfig/nimls.lua index cc80dae8..4fa6a8ad 100644 --- a/lua/lspconfig/nimls.lua +++ b/lua/lspconfig/nimls.lua @@ -6,7 +6,9 @@ configs.nimls = { cmd = {"nimlsp",}; filetypes = {'nim'}; root_dir = function(fname) - return util.find_git_ancestor(fname) or vim.loop.os_homedir() + return util.root_pattern("*.nimble")(fname) or + util.find_git_ancestor(fname) or + util.path.dirname(fname) end; }; docs = { |
