mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-13 16:18:36 +00:00
language/cue: migrate to vim.lsp.servers
This commit is contained in:
parent
478bbc67f4
commit
8a51914ba4
1 changed files with 8 additions and 8 deletions
|
@ -5,10 +5,17 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.types) package;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
lspOptions = {
|
||||
cmd = [(getExe pkgs.cue) "lsp"];
|
||||
filetypes = ["cue"];
|
||||
root_markers = ["cue.mod" ".git"];
|
||||
};
|
||||
|
||||
cfg = config.vim.languages.cue;
|
||||
in {
|
||||
options.vim.languages.cue = {
|
||||
|
@ -38,14 +45,7 @@ in {
|
|||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
vim.lsp.lspconfig.enable = true;
|
||||
vim.lsp.lspconfig.sources.cue-lsp = ''
|
||||
lspconfig.cue.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = default_on_attach,
|
||||
cmd = {"${cfg.lsp.package}/bin/cue", "lsp"},
|
||||
}
|
||||
'';
|
||||
vim.lsp.servers.cue = lspOptions;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue