Compare commits

...

6 commits

Author SHA1 Message Date
Soliprem
903a4cd86a
Merge 8268f13bdd into da86e554a6 2024-10-24 03:00:01 +00:00
Soliprem
da86e554a6
Fix typo in otter setupOpts (#424)
* Revert "leap: changed default binds"

This reverts commit 92a7bfc4b8.

* Reapply "leap: changed default binds"

This reverts commit ede1d4437e2d8d1a6ff31b4dc855676c6e16df36.

* otter: fixed stupid typo

* otter: added changelog entry
2024-10-23 14:51:43 +00:00
Soliprem
8268f13bdd haskell: for some reason now LSP works 2024-10-20 12:48:37 +02:00
Soliprem
accd26bd83 haskell: for some reason now LSP works 2024-10-20 12:48:30 +02:00
Soliprem
b7f296f170 haskell: haskell support 2024-10-20 11:09:28 +02:00
Soliprem
cccde8b6fd haskell: default to isMaximal 2024-10-20 11:09:28 +02:00
5 changed files with 53 additions and 1 deletions

View file

@ -63,6 +63,7 @@ isMaximal: {
dart.enable = isMaximal;
bash.enable = isMaximal;
r.enable = isMaximal;
haskell.enable = isMaximal;
tailwind.enable = isMaximal;
typst.enable = isMaximal;
clang = {

View file

@ -279,6 +279,7 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
- Add LSP and Treesitter support for R under `vim.languages.R`.
- Add Otter support under `vim.lsp.otter` and an assert to prevent conflict with
ccc
- Fixed typo in Otter's setupOpts
- Add Neorg support under `vim.notes.neorg`
- Add LSP, diagnostics, formatter and Treesitter support for Kotlin under
`vim.languages.kotlin`

View file

@ -9,6 +9,7 @@ in {
./elixir.nix
./go.nix
./kotlin.nix
./haskell.nix
./html.nix
./java.nix
./lua.nix

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) package;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.haskell;
in {
options.vim.languages.haskell = {
enable = mkEnableOption "Haskell support";
treesitter = {
enable = mkEnableOption "Haskell treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "haskell";
};
lsp = {
enable = mkEnableOption "Haskell LSP support (haskell-language-server)" // {default = config.vim.languages.enableLSP;};
package = mkOption {
description = "haskell-language-server package";
type = package;
default = pkgs.haskell-language-server;
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.hls = ''
lspconfig.hls.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = {"${cfg.lsp.package}/bin/haskell-language-server"},
}
'';
})
]);
}

View file

@ -32,7 +32,7 @@ in {
pluginRC.otter-nvim = entryAnywhere ''
-- Enable otter diagnostics viewer
require("otter").setup({${toLuaObject cfg.otter-nvim.setupOpts}})
require("otter").setup(${toLuaObject cfg.otter-nvim.setupOpts})
'';
};
};