mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 11:55:22 +00:00
lsp/presets/sqls: init
This commit is contained in:
parent
7ce9d912f4
commit
8d46def1af
2 changed files with 35 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
./deno.nix
|
./deno.nix
|
||||||
./harper.nix
|
./harper.nix
|
||||||
./lemminx.nix
|
./lemminx.nix
|
||||||
|
./sqls.nix
|
||||||
./svelte-language-server.nix
|
./svelte-language-server.nix
|
||||||
./tailwindcss-language-server.nix
|
./tailwindcss-language-server.nix
|
||||||
./taplo.nix
|
./taplo.nix
|
||||||
|
|
|
||||||
34
modules/plugins/lsp/presets/sqls.nix
Normal file
34
modules/plugins/lsp/presets/sqls.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.meta) getExe;
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
|
||||||
|
cfg = config.vim.lsp.presets.sqls;
|
||||||
|
in {
|
||||||
|
options.vim.lsp.presets.sqls = {
|
||||||
|
enable = mkEnableOption "the SQL Language Server";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["sqls-nvim"];
|
||||||
|
lsp.servers.sqls = {
|
||||||
|
enable = true;
|
||||||
|
cmd = [(getExe pkgs.sqls)];
|
||||||
|
root_markers = ["config.yml"];
|
||||||
|
on_attach = mkLuaInline ''
|
||||||
|
function(client, bufnr)
|
||||||
|
client.server_capabilities.execute_command = true
|
||||||
|
require'sqls'.setup{}
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue