diff options
| author | William Boman <william@redwill.se> | 2022-06-08 17:54:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-08 08:54:14 -0700 |
| commit | b99c853099672df4060c4118742edb3217094f9e (patch) | |
| tree | 5f49cca272788a4d6e956dbc3f68b56b304481d1 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.tar nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.tar.gz nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.tar.bz2 nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.tar.lz nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.tar.xz nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.tar.zst nvim-lspconfig-b99c853099672df4060c4118742edb3217094f9e.zip | |
fix(svlangserver): don't use custom project setting resolution (#1948)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/svlangserver.lua | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lua/lspconfig/server_configurations/svlangserver.lua b/lua/lspconfig/server_configurations/svlangserver.lua index 613f815a..72eef65b 100644 --- a/lua/lspconfig/server_configurations/svlangserver.lua +++ b/lua/lspconfig/server_configurations/svlangserver.lua @@ -27,7 +27,7 @@ return { cmd = cmd, filetypes = { 'verilog', 'systemverilog' }, root_dir = function(fname) - return util.root_pattern '.nvim'(fname) or util.find_git_ancestor(fname) + return util.root_pattern '.svlangserver'(fname) or util.find_git_ancestor(fname) end, single_file_support = true, settings = { @@ -35,16 +35,6 @@ return { includeIndexing = { '*.{v,vh,sv,svh}', '**/*.{v,vh,sv,svh}' }, }, }, - on_init = function(client) - local json = '' - for line in io.lines(client.config.root_dir .. '/.nvim/lspconfig.json') do - json = json .. line - end - json = vim.json.decode(json) - client.config.cmd = { json.languageserver.svlangserver.command } - client.config.filetypes = json.languageserver.svlangserver.filetypes - client.config.settings = json.languageserver.svlangserver.settings - end, }, commands = { SvlangserverBuildIndex = { @@ -60,7 +50,16 @@ return { description = [[ https://github.com/imc-trading/svlangserver -`svlangserver`, a language server for systemverilog +Language server for SystemVerilog. + +`svlangserver` can be installed via `npm`: + +```sh +$ npm install -g @imc-trading/svlangserver +``` ]], + default_config = { + root_dir = [[root_pattern(".svlangserver", ".git")]], + }, }, } |
