Skip to content

Commit

Permalink
Deprecate rnix-lsp and add nil
Browse files Browse the repository at this point in the history
  • Loading branch information
klarkc committed Oct 1, 2024
1 parent 195fa71 commit f06d5a8
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ You can change the directory to install servers by set `g:lsp_settings_servers_d
| Markdown | Marksman | Yes | Yes |
| Nim | nimls | No | No |
| Nix | nixd | Yes | Yes |
| Nix | rnix-lsp | Yes | Yes |
| Nix | nil | Yes | Yes |
| PHP | intelephense | Yes | Yes |
| PHP | psalm-language-server | Yes | Yes |
| OCaml | ocaml-lsp | UNIX Only | Yes |
Expand Down
4 changes: 4 additions & 0 deletions installer/install-nil-lsp.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off

call nix-env -f -iA nixpkgs.nil

5 changes: 5 additions & 0 deletions installer/install-nil-lsp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

nix-env -f -iA nixpkgs.nil
8 changes: 8 additions & 0 deletions settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,14 @@
}
],
"nix": [
{
"command": "nil",
"url": "https://github.com/oxalica/nil",
"description": "Nix Language server, an incremental analysis assistant for writing in Nix",
"requires": [
"nix"
]
},
{
"command": "rnix-lsp",
"url": "https://github.com/nix-community/rnix-lsp",
Expand Down
14 changes: 14 additions & 0 deletions settings/nil.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
augroup vim_lsp_settings_nil
au!
LspRegisterServer {
\ 'name': 'nil',
\ 'cmd': {server_info->lsp_settings#get('nil', 'cmd', lsp_settings#exec_path('nil'))},
\ 'root_uri':{server_info->lsp_settings#get('nil', 'root_uri', lsp_settings#root_uri('nil'))},
\ 'initialization_options': lsp_settings#get('nil', 'initialization_options', {}),
\ 'allowlist': lsp_settings#get('nil', 'allowlist', ['nix']),
\ 'blocklist': lsp_settings#get('nil', 'blocklist', []),
\ 'config': lsp_settings#get('nil', 'config', lsp_settings#server_config('nil')),
\ 'workspace_config': lsp_settings#get('nil', 'workspace_config', {}),
\ 'semantic_highlight': lsp_settings#get('nil', 'semantic_highlight', {}),
\ }
augroup END
1 change: 1 addition & 0 deletions settings/rnix-lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ augroup vim_lsp_settings_rnix_lsp
\ 'config': lsp_settings#get('rnix-lsp', 'config', lsp_settings#server_config('rnix-lsp')),
\ 'workspace_config': lsp_settings#get('rnix-lsp', 'workspace_config', {}),
\ 'semantic_highlight': lsp_settings#get('rnix-lsp', 'semantic_highlight', {}),
\ 'deprecated': v:true,
\ }
augroup END

0 comments on commit f06d5a8

Please sign in to comment.