mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 03:47:37 +00:00
lsp/presets/vala-language-server: init
This commit is contained in:
parent
32ba93fe34
commit
78eac1d1c2
3 changed files with 41 additions and 0 deletions
|
|
@ -71,6 +71,8 @@
|
||||||
|
|
||||||
- Renamed `tsgo` to `typescript-go`.
|
- Renamed `tsgo` to `typescript-go`.
|
||||||
|
|
||||||
|
- Renamed `vala_ls` to `vala-language-server`.
|
||||||
|
|
||||||
## Changelog {#sec-release-0-9-changelog}
|
## Changelog {#sec-release-0-9-changelog}
|
||||||
|
|
||||||
[SecBear](https://github.com/SecBear):
|
[SecBear](https://github.com/SecBear):
|
||||||
|
|
@ -240,6 +242,9 @@
|
||||||
- Added `vim.lsp.presets.<name>` to contain LSP configurations. This allows for
|
- Added `vim.lsp.presets.<name>` to contain LSP configurations. This allows for
|
||||||
more flexibility in nvf and reuse of LSPs across languages.
|
more flexibility in nvf and reuse of LSPs across languages.
|
||||||
|
|
||||||
|
- Fix `vim.lsp.presets.vala-language-server` to be wrapped correctly with
|
||||||
|
`uncrustify`.
|
||||||
|
|
||||||
- Fix `tressiter` to allow `null` in grammar options, so they can be filtered
|
- Fix `tressiter` to allow `null` in grammar options, so they can be filtered
|
||||||
out.
|
out.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,6 @@
|
||||||
./twig-language-server.nix
|
./twig-language-server.nix
|
||||||
./typescript-go.nix
|
./typescript-go.nix
|
||||||
./typescript-language-server.nix
|
./typescript-language-server.nix
|
||||||
|
./vala-language-server.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
modules/plugins/lsp/presets/vala-language-server.nix
Normal file
35
modules/plugins/lsp/presets/vala-language-server.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.meta) getExe;
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
|
cfg = config.vim.lsp.presets.vala-language-server;
|
||||||
|
in {
|
||||||
|
options.vim.lsp.presets.vala-language-server = {
|
||||||
|
enable = mkEnableOption "the Vala Language Server";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim.lsp.servers.vala-language-server = {
|
||||||
|
enable = true;
|
||||||
|
# We are wrapping the LSP with uncrustify in the path,
|
||||||
|
# because it is an optional dependency to support formatting
|
||||||
|
# <https://github.com/vala-lang/vala-language-server#dependencies>
|
||||||
|
cmd = [
|
||||||
|
(getExe (pkgs.symlinkJoin {
|
||||||
|
name = "vala-language-server-wrapper";
|
||||||
|
paths = [pkgs.vala-language-server];
|
||||||
|
meta.mainProgram = "vala-language-server";
|
||||||
|
buildInputs = [pkgs.makeBinaryWrapper];
|
||||||
|
postBuild = "wrapProgram $out/bin/vala-language-server --prefix PATH : ${pkgs.uncrustify}/bin";
|
||||||
|
}))
|
||||||
|
];
|
||||||
|
root_markers = [".git"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue