mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-08 09:09:49 +01:00
Compare commits
2 commits
9d8146e792
...
087b38383a
Author | SHA1 | Date | |
---|---|---|---|
|
087b38383a | ||
|
59dc44f9c1 |
2 changed files with 15 additions and 15 deletions
|
@ -55,7 +55,6 @@ isMaximal: {
|
||||||
sql.enable = isMaximal;
|
sql.enable = isMaximal;
|
||||||
java.enable = isMaximal;
|
java.enable = isMaximal;
|
||||||
kotlin.enable = isMaximal;
|
kotlin.enable = isMaximal;
|
||||||
haskell.enable = isMaximal;
|
|
||||||
ts.enable = isMaximal;
|
ts.enable = isMaximal;
|
||||||
go.enable = isMaximal;
|
go.enable = isMaximal;
|
||||||
lua.enable = isMaximal;
|
lua.enable = isMaximal;
|
||||||
|
@ -80,6 +79,7 @@ isMaximal: {
|
||||||
dart.enable = false;
|
dart.enable = false;
|
||||||
ocaml.enable = false;
|
ocaml.enable = false;
|
||||||
elixir.enable = false;
|
elixir.enable = false;
|
||||||
|
haskell.enable = false;
|
||||||
|
|
||||||
tailwind.enable = false;
|
tailwind.enable = false;
|
||||||
svelte.enable = false;
|
svelte.enable = false;
|
||||||
|
|
|
@ -5,14 +5,13 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) isList;
|
inherit (builtins) isList;
|
||||||
inherit (lib) options modules nvim strings types;
|
inherit (lib.types) either package listOf str;
|
||||||
inherit (types) either package listOf str;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (options) mkEnableOption mkOption;
|
inherit (lib.strings) optionalString;
|
||||||
inherit (strings) optionalString;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (modules) mkIf mkMerge;
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
inherit (nvim.types) mkGrammarOption;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
inherit (nvim.dag) entryAnywhere;
|
inherit (lib.nvim.lua) expToLua;
|
||||||
inherit (nvim.lua) expToLua;
|
|
||||||
inherit (pkgs) haskellPackages;
|
inherit (pkgs) haskellPackages;
|
||||||
cfg = config.vim.languages.haskell;
|
cfg = config.vim.languages.haskell;
|
||||||
in {
|
in {
|
||||||
|
@ -27,6 +26,7 @@ in {
|
||||||
enable = mkEnableOption "LSP support for Haskell" // {default = config.vim.languages.enableLSP;};
|
enable = mkEnableOption "LSP support for Haskell" // {default = config.vim.languages.enableLSP;};
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "Haskell LSP package or command to run the Haskell LSP";
|
description = "Haskell LSP package or command to run the Haskell LSP";
|
||||||
|
example = ''[ (lib.getExe pkgs.haskellPackages.haskell-language-server) "--debug" ]'';
|
||||||
default = haskellPackages.haskell-language-server;
|
default = haskellPackages.haskell-language-server;
|
||||||
type = either package (listOf str);
|
type = either package (listOf str);
|
||||||
};
|
};
|
||||||
|
@ -71,14 +71,14 @@ in {
|
||||||
on_attach = function(client, bufnr, ht)
|
on_attach = function(client, bufnr, ht)
|
||||||
default_on_attach(client, bufnr, ht)
|
default_on_attach(client, bufnr, ht)
|
||||||
local opts = { noremap = true, silent = true, buffer = bufnr }
|
local opts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
vim.keymap.set('n', '<space>cl', vim.lsp.codelens.run, opts)
|
vim.keymap.set('n', '<localleader>cl', vim.lsp.codelens.run, opts)
|
||||||
vim.keymap.set('n', '<space>hs', ht.hoogle.hoogle_signature, opts)
|
vim.keymap.set('n', '<localleader>hs', ht.hoogle.hoogle_signature, opts)
|
||||||
vim.keymap.set('n', '<space>ea', ht.lsp.buf_eval_all, opts)
|
vim.keymap.set('n', '<localleader>ea', ht.lsp.buf_eval_all, opts)
|
||||||
vim.keymap.set('n', '<leader>rr', ht.repl.toggle, opts)
|
vim.keymap.set('n', '<localleader>rr', ht.repl.toggle, opts)
|
||||||
vim.keymap.set('n', '<leader>rf', function()
|
vim.keymap.set('n', '<localleader>rf', function()
|
||||||
ht.repl.toggle(vim.api.nvim_buf_get_name(0))
|
ht.repl.toggle(vim.api.nvim_buf_get_name(0))
|
||||||
end, opts)
|
end, opts)
|
||||||
vim.keymap.set('n', '<leader>rq', ht.repl.quit, opts)
|
vim.keymap.set('n', '<localleader>rq', ht.repl.quit, opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
''}
|
''}
|
||||||
|
|
Loading…
Reference in a new issue