Go for kakoune

This commit is contained in:
Filippo Berto 2021-05-15 11:11:41 +02:00
parent f2613a1d57
commit c320c81553
3 changed files with 18 additions and 7 deletions

View file

@ -107,7 +107,7 @@ args = ["--stdio"]
[language.javascript]
filetypes = ["javascript"]
roots = [".flowconfig"]
roots = [".flowconfig", "app.js"]
command = "flow"
args = ["lsp"]

1
modules/kak Normal file
View file

@ -0,0 +1 @@

View file

@ -2,6 +2,14 @@
let
unstable = import <nixos-unstable> {};
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 <tab> <c-n>" "map window insert <s-tab> <c-p>" ]; }
{ name = "InsertCompletionHide"; option = ".*"; commands = builtins.concatStringsSep "\n" [ "unmap window insert <tab> <c-n>" "unmap window insert <s-tab> <c-p>" ]; }
];
@ -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;
}