Add nixd alternative

This commit is contained in:
klarkc
2023-06-19 21:01:27 -03:00
committed by mattn
parent a5d96c22a3
commit 8c035c1ca7
4 changed files with 28 additions and 0 deletions

View File

@@ -130,6 +130,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
| Markdown (remark) | remark-language-server | Yes | Yes |
| Markdown | Marksman | Yes | Yes |
| Nim | nimls | No | No |
| Nix | nixd | Yes | Yes |
| Nix | rnix-lsp | Yes | Yes |
| PHP | intelephense | Yes | Yes |
| PHP | psalm-language-server | Yes | Yes |

5
installer/install-nixd-lsp.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
nix-env -i -f "https://github.com/nix-community/nixd/archive/master.tar.gz"

View File

@@ -890,6 +890,14 @@
"requires": [
"nix"
]
},
{
"command": "nixd",
"url": "https://github.com/nix-community/nixd",
"description": "Nix language server, based on nix libraries",
"requires": [
"nix"
]
}
],
"objc": [

14
settings/nixd.vim Normal file
View File

@@ -0,0 +1,14 @@
augroup vim_lsp_settings_nixd
au!
LspRegisterServer {
\ 'name': 'nixd',
\ 'cmd': {server_info->lsp_settings#get('nixd', 'cmd', lsp_settings#exec_path('nixd'))},
\ 'root_uri':{server_info->lsp_settings#get('nid', 'root_uri', lsp_settings#root_uri('nixd'))},
\ 'initialization_options': lsp_settings#get('nixd', 'initialization_options', {}),
\ 'allowlist': lsp_settings#get('nixd', 'allowlist', ['nix']),
\ 'blocklist': lsp_settings#get('nixd', 'blocklist', []),
\ 'config': lsp_settings#get('nixd', 'config', lsp_settings#server_config('nixd')),
\ 'workspace_config': lsp_settings#get('nixd', 'workspace_config', {}),
\ 'semantic_highlight': lsp_settings#get('nixd', 'semantic_highlight', {}),
\ }
augroup END