Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.

Commit

Permalink
lua LSP
Browse files Browse the repository at this point in the history
  • Loading branch information
siph committed Aug 24, 2022
1 parent 891a9f9 commit 935ea24
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
go = false;
java = true;
kotlin = true;
lua = true;
};
vim.visuals = {
enable = true;
Expand Down
1 change: 1 addition & 0 deletions lib/buildPlugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
p.tree-sitter-graphql
p.tree-sitter-java
p.tree-sitter-kotlin
p.tree-sitter-lua
]);

buildPlug = name:
Expand Down
21 changes: 21 additions & 0 deletions modules/lsp/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ in {
ts = mkEnableOption "TS language LSP";
java = mkEnableOption "Java language LSP";
kotlin = mkEnableOption "Kotlin language LSP";
lua = mkEnableOption "Lua Language LSP";
};

config = mkIf cfg.enable (
Expand Down Expand Up @@ -345,6 +346,26 @@ in {
cmd = {"${pkgs.kotlin-language-server}/bin/kotlin-language-server"},
}
''}
${writeIf cfg.lua ''
-- Kotlin config
lspconfig.sumneko_lua.setup {
capabilities = capabilities;
on_attach = default_on_attach;
cmd = {"${pkgs.sumneko-lua-language-server}/bin/lua-language-server"},
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostice = {
globals = {},
},
telemetry = {
enable = false;
};
}
}
''}
'';
}
);
Expand Down

0 comments on commit 935ea24

Please sign in to comment.