From c320c815538ff97cdcead1d03c5304316b82025b Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Sat, 15 May 2021 11:11:41 +0200 Subject: [PATCH] Go for kakoune --- configs/kak-lsp/kak-lsp.toml | 2 +- modules/kak | 1 + modules/kakoune.nix | 22 ++++++++++++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 modules/kak diff --git a/configs/kak-lsp/kak-lsp.toml b/configs/kak-lsp/kak-lsp.toml index 022178e..0763804 100644 --- a/configs/kak-lsp/kak-lsp.toml +++ b/configs/kak-lsp/kak-lsp.toml @@ -107,7 +107,7 @@ args = ["--stdio"] [language.javascript] filetypes = ["javascript"] -roots = [".flowconfig"] +roots = [".flowconfig", "app.js"] command = "flow" args = ["lsp"] diff --git a/modules/kak b/modules/kak new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/modules/kak @@ -0,0 +1 @@ + diff --git a/modules/kakoune.nix b/modules/kakoune.nix index 91ca972..a62e278 100644 --- a/modules/kakoune.nix +++ b/modules/kakoune.nix @@ -2,6 +2,14 @@ let unstable = import {}; in { + home.packages = with pkgs; [ + kak-lsp + rnix-lsp + gocode + gogetdoc + jq + ]; + programs.kakoune = { enable = true; config = { @@ -44,8 +52,8 @@ in { hooks = [ { name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; } { name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; } - # { name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; } - # { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; } + { name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; } + { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; } { name = "InsertCompletionShow"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "map window insert " "map window insert " ]; } { name = "InsertCompletionHide"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "unmap window insert " "unmap window insert " ]; } ]; @@ -55,13 +63,15 @@ in { "define-command -docstring 'save and quit' x 'write-all; quit'" "add-highlighter global/ regex \\h+$ 0:Error # " "eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp" - # "require-module auto-pairs" - # "require-module powerline" + "require-module auto-pairs" + "require-module powerline" ]; plugins = with pkgs.kakounePlugins; [ kak-auto-pairs - # unstable.kakounePlugins.powerline-kak - # unstable.kakounePlugins.prelude-kak + unstable.kakounePlugins.powerline-kak + unstable.kakounePlugins.prelude-kak ]; }; + + xdg.configFile."kak-lsp/kak-lsp.toml".source = ../configs/kak-lsp/kak-lsp.toml; }