diff options
| author | crupest <crupest@outlook.com> | 2025-06-07 01:31:30 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2025-06-07 02:15:26 +0800 | 
| commit | 6b89c554f82a53151a971ce056abe2d047d47ad9 (patch) | |
| tree | 7b97d5649c39b2c45f4273cdad5969ce2c5eedac /store/config/nvim/lua/setup | |
| parent | b29739aed3c34367b60dc62fb6a8a28f5c0623f8 (diff) | |
| download | crupest-6b89c554f82a53151a971ce056abe2d047d47ad9.tar.gz crupest-6b89c554f82a53151a971ce056abe2d047d47ad9.tar.bz2 crupest-6b89c554f82a53151a971ce056abe2d047d47ad9.zip  | |
config(nvim): fix deno lsp root dir.
Diffstat (limited to 'store/config/nvim/lua/setup')
| -rw-r--r-- | store/config/nvim/lua/setup/lsp.lua | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/store/config/nvim/lua/setup/lsp.lua b/store/config/nvim/lua/setup/lsp.lua index 77c9062..472cdaf 100644 --- a/store/config/nvim/lua/setup/lsp.lua +++ b/store/config/nvim/lua/setup/lsp.lua @@ -51,9 +51,24 @@ local function setup_lua_ls()      })  end +local function setup_denols() +    vim.lsp.config("denols", { +        root_dir = function(bufnr, on_dir) +            local deno_configs = vim.fs.find({ "deno.json", "deno.jsonc" }, { +                path = vim.api.nvim_buf_get_name(bufnr), upward = true, limit = math.huge }) +            if 0 ~= #deno_configs then +                local deno_config = deno_configs[#deno_configs] +                on_dir(vim.fs.dirname(deno_config)) +            end +        end, +    }) +end + +  local function setup()      setup_clangd()      setup_lua_ls() +    setup_denols()      function _G.crupest_no_range_format()          vim.notify("Range format is no supported by the lsp.", vim.log.levels.ERROR, {})  | 
