mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-22 03:34:31 +02:00
[Feature] Allow for custom path to a language server binary (#1043)
This commit is contained in:
parent
9e640fa4d9
commit
0064b446a0
30 changed files with 150 additions and 45 deletions
|
@ -19,6 +19,9 @@ M.config = function()
|
|||
signs = true,
|
||||
underline = true,
|
||||
},
|
||||
lsp = {
|
||||
path = DATA_PATH .. "/lspinstall/rust/rust-analyzer",
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -118,14 +121,14 @@ M.lsp = function()
|
|||
-- these override the defaults set by rust-tools.nvim
|
||||
-- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
|
||||
server = {
|
||||
cmd = { DATA_PATH .. "/lspinstall/rust/rust-analyzer" },
|
||||
cmd = { O.lang.rust.lsp.path },
|
||||
on_attach = require("lsp").common_on_attach,
|
||||
}, -- rust-analyser options
|
||||
}
|
||||
require("rust-tools").setup(opts)
|
||||
else
|
||||
require("lspconfig").rust_analyzer.setup {
|
||||
cmd = { DATA_PATH .. "/lspinstall/rust/rust-analyzer" },
|
||||
cmd = { O.lang.rust.lsp.path },
|
||||
on_attach = require("lsp").common_on_attach,
|
||||
filetypes = { "rust" },
|
||||
root_dir = require("lspconfig.util").root_pattern("Cargo.toml", "rust-project.json"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue