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

Commit

Permalink
haskell lsp + treesitter
Browse files Browse the repository at this point in the history
  • Loading branch information
siph committed Apr 4, 2023
1 parent f9a8f08 commit bce9c12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@
zig.enable = false;
java = true;
kotlin = true;
lua = true;
nu = true;
haskell = true;
};
vim.visuals = {
enable = true;
Expand Down
31 changes: 10 additions & 21 deletions modules/lsp/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ in {
zig.enable = mkEnableOption "Zig language LSP";
java = mkEnableOption "Java language LSP";
kotlin = mkEnableOption "Kotlin language LSP";
lua = mkEnableOption "Lua Language LSP";
nu = mkEnableOption "Nushell Language LSP";
haskell = mkEnableOption "Haskell Language LSP";
};

config = mkIf cfg.enable (
Expand Down Expand Up @@ -313,6 +313,15 @@ in {
}
''}
${writeIf cfg.haskell ''
--Haskell config
lspconfig.hls.setup {
capabilities = capabilities,
on_attach=default_on_attach,
cmd = {"${pkgs.haskell-language-server}/bin/haskell-language-server-wrapper", "--lsp"},
}
''}
${writeIf cfg.python ''
-- Python config
lspconfig.pyright.setup{
Expand Down Expand Up @@ -384,26 +393,6 @@ in {
}
''}
${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;
};
}
}
''}
${writeIf cfg.clang.enable ''
-- CCLS (clang) config
lspconfig.ccls.setup{
Expand Down
2 changes: 1 addition & 1 deletion modules/treesitter/treesitter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ in {
cpp
css
graphql
haskell
html
java
javascript
json
kotlin
lua
make
markdown-inline
nix
Expand Down

0 comments on commit bce9c12

Please sign in to comment.