Kakoune modularization
This commit is contained in:
parent
8e57725eb4
commit
99ecdcaa57
2 changed files with 298 additions and 420 deletions
6
home.nix
6
home.nix
|
|
@ -1,10 +1,6 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
nix-rice = fetchTarball {
|
||||
url = "https://github.com/bertof/nix-rice/archive/refs/tags/v0.1.2.tar.gz";
|
||||
sha256 = "15f97nwwvk828vnx6kk325zzjn4q37hrpp9aiqiz2qhfs06mr147";
|
||||
};
|
||||
nord = import ./themes/nord.nix;
|
||||
onedark = import ./themes/onedark.nix;
|
||||
in
|
||||
|
|
@ -82,7 +78,7 @@ in
|
|||
procps-ng
|
||||
ripgrep
|
||||
shotwell
|
||||
skypeforlinux
|
||||
skype
|
||||
slack
|
||||
spotify
|
||||
tdesktop
|
||||
|
|
|
|||
|
|
@ -1,56 +1,103 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
kakCmd = "kak";
|
||||
stablePkgs = import (
|
||||
builtins.fetchTarball {
|
||||
name = "nixos-unstable-2021-09-08";
|
||||
url = "https://github.com/nixos/nixpkgs/archive/bc06c93905f60a82d6ebbb78f78cf289257860cc.tar.gz";
|
||||
sha256 = "10msryn9d7wz2n58fs35cl5jv9q7f26lw2lcdc3f9v792v0r68pm";
|
||||
}
|
||||
) {};
|
||||
|
||||
strPalette = with pkgs.rice; palette.toRgbShortHex colorPalette;
|
||||
rustPlugins = with pkgs; [
|
||||
|
||||
cfg = {
|
||||
enableCppSupport = true;
|
||||
enableDataSupport = true;
|
||||
enableGoSupport = true;
|
||||
enableHtmlSupport = true;
|
||||
enableJavascriptSupport = true;
|
||||
enableLatexSupport = true;
|
||||
enableNixSupport = true;
|
||||
enablePythonSupport = true;
|
||||
enableRustSupport = true;
|
||||
enableShellSupport = true;
|
||||
enableSpellingSupport = true;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
# editorconfig-core-c
|
||||
python3.pkgs.editorconfig
|
||||
] ++ (
|
||||
lib.optionals cfg.enableCppSupport [
|
||||
clang-tools
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableDataSupport [
|
||||
yaml-language-server
|
||||
nodePackages.vscode-langservers-extracted
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableHtmlSupport [
|
||||
nodePackages.vscode-langservers-extracted
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableJavascriptSupport [
|
||||
flow
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableLatexSupport [
|
||||
texlab
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableNixSupport [
|
||||
rnix-lsp
|
||||
]
|
||||
) ++ (
|
||||
with python3.pkgs; lib.optionals cfg.enablePythonSupport [
|
||||
black
|
||||
# pyls-black
|
||||
pyls-flake8
|
||||
pyls-isort
|
||||
# pyls-mypy
|
||||
python-lsp-server
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableRustSupport [
|
||||
cargo
|
||||
cargo-watch
|
||||
clippy
|
||||
rust-analyzer
|
||||
rustc
|
||||
rustfmt
|
||||
];
|
||||
bashPlugins = with pkgs; [
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableShellSupport [
|
||||
nodePackages.bash-language-server
|
||||
];
|
||||
cppPlugins = with pkgs; [
|
||||
clang-tools
|
||||
];
|
||||
latexPlugins = with pkgs; [
|
||||
texlab
|
||||
];
|
||||
pythonPlugins = with pkgs.python38Packages; [
|
||||
black
|
||||
pyls-black
|
||||
pyls-isort
|
||||
pyls-mypy
|
||||
python-language-server
|
||||
];
|
||||
javascriptPlugins = with pkgs; [
|
||||
flow
|
||||
];
|
||||
nixPlugins = with pkgs; [
|
||||
rnix-lsp
|
||||
];
|
||||
spellingPlugins = with pkgs; [
|
||||
]
|
||||
) ++ (
|
||||
lib.optionals cfg.enableSpellingSupport [
|
||||
aspell
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
aspellDicts.en-science
|
||||
aspellDicts.it
|
||||
];
|
||||
dataFormats = with pkgs; [
|
||||
yaml-language-server
|
||||
nodePackages.vscode-langservers-extracted
|
||||
]
|
||||
);
|
||||
|
||||
plugins = with stablePkgs; [
|
||||
kakounePlugins.prelude-kak
|
||||
kakounePlugins.kak-lsp
|
||||
# kakounePlugins.auto-pairs-kak
|
||||
kakounePlugins.powerline-kak
|
||||
kakounePlugins.connect-kak
|
||||
];
|
||||
in
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = kakCmd;
|
||||
VISUAL = kakCmd;
|
||||
};
|
||||
programs.bash.shellAliases = { k = kakCmd; };
|
||||
programs.zsh.shellAliases = { k = kakCmd; };
|
||||
home.sessionVariables = { EDITOR = "kak"; VISUAL = "kak"; };
|
||||
programs.bash.shellAliases = { k = "kak"; };
|
||||
programs.zsh.shellAliases = { k = "kak"; };
|
||||
|
||||
home.packages = packages;
|
||||
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
|
|
@ -97,14 +144,15 @@ in
|
|||
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||
{ name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||
{ name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "powerline-enable" ]; }
|
||||
{ name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go|nix)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||
# { name = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go|nix)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||
];
|
||||
};
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
"# Custom commands"
|
||||
"define-command -docstring 'save and quit' x 'write-all; quit' # Save and quit with 'x'"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
||||
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
||||
"lsp-enable"
|
||||
|
||||
# Kak-lsp snippet support
|
||||
''
|
||||
|
|
@ -118,26 +166,12 @@ in
|
|||
}
|
||||
''
|
||||
|
||||
"require-module prelude"
|
||||
#"require-module auto-pairs"
|
||||
"require-module connect"
|
||||
"powerline-start"
|
||||
"require-module connect-broot"
|
||||
"require-module connect-lf"
|
||||
"require-module connect-rofi"
|
||||
"require-module powerline"
|
||||
];
|
||||
plugins = (
|
||||
with pkgs; [
|
||||
broot
|
||||
lf
|
||||
editorconfig-core-c
|
||||
# kakounePlugins.auto-pairs-kak
|
||||
kakounePlugins.kak-lsp
|
||||
kakounePlugins.powerline-kak
|
||||
kakounePlugins.prelude-kak
|
||||
kakounePlugins.connect-kak
|
||||
]
|
||||
) ++ rustPlugins ++ bashPlugins ++ cppPlugins ++ pythonPlugins ++ javascriptPlugins ++ latexPlugins ++ nixPlugins ++ spellingPlugins ++ dataFormats;
|
||||
plugins = plugins;
|
||||
};
|
||||
|
||||
xdg.configFile."kak/colors/nord.kak".text = with strPalette; ''
|
||||
|
|
@ -169,267 +203,125 @@ in
|
|||
set-face global BufferPadding default,default
|
||||
'';
|
||||
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml".text = with pkgs; builtins.concatStringsSep "\n" (
|
||||
[
|
||||
''
|
||||
snippet_support = false
|
||||
verbosity = 2
|
||||
|
||||
[server]
|
||||
timeout = 1800 # seconds = 30 minutes
|
||||
|
||||
[language.bash]
|
||||
filetypes = ["sh"]
|
||||
roots = [".git", ".hg"]
|
||||
command = "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server"
|
||||
args = ["start"]
|
||||
|
||||
''
|
||||
]
|
||||
++ (
|
||||
lib.optional cfg.enableCppSupport ''
|
||||
[language.c_cpp]
|
||||
filetypes = ["c", "cpp"]
|
||||
roots = ["compile_commands.json", ".clangd"]
|
||||
command = "${pkgs.clang-tools}/bin/clangd"
|
||||
command = "${clang-tools}/bin/clangd"
|
||||
offset_encoding = "utf-8"
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableDataSupport ''
|
||||
[language.json]
|
||||
filetypes = ["json"]
|
||||
roots = ["package.json"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-json-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
# [language.crystal]
|
||||
# filetypes = ["crystal"]
|
||||
# roots = ["shard.yml"]
|
||||
# command = "scry"
|
||||
[language.yaml]
|
||||
filetypes = ["yaml"]
|
||||
roots = [".git"]
|
||||
command = "${yaml-language-server}/bin/yaml-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.yaml.settings]
|
||||
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
||||
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
||||
yaml.format.enable = true
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableGoSupport ''
|
||||
[language.go]
|
||||
filetypes = ["go"]
|
||||
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
||||
command = "gopls"
|
||||
offset_encoding = "utf-8"
|
||||
settings_section = "gopls"
|
||||
[language.go.settings.gopls]
|
||||
# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
||||
# "build.buildFlags" = []
|
||||
''
|
||||
)
|
||||
++ (
|
||||
lib.optional cfg.enableHtmlSupport ''
|
||||
[language.html]
|
||||
filetypes = ["html"]
|
||||
roots = ["package.json"]
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-html-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
[language.css]
|
||||
filetypes = ["css"]
|
||||
roots = ["package.json", ".git"]
|
||||
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
[language.less]
|
||||
filetypes = ["less"]
|
||||
roots = ["package.json", ".git"]
|
||||
command = "css-languageserver"
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
[language.scss]
|
||||
filetypes = ["scss"]
|
||||
roots = ["package.json", ".git"]
|
||||
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
# [language.d]
|
||||
# filetypes = ["d", "di"]
|
||||
# roots = [".git", "dub.sdl", "dub.json"]
|
||||
# command = "dls"
|
||||
|
||||
# [language.dart]
|
||||
# # start shell to find path to dart analysis server source
|
||||
# filetypes = ["dart"]
|
||||
# roots = ["pubspec.yaml", ".git"]
|
||||
# command = "sh"
|
||||
# args = ["-c", "dart $(dirname $(command -v dart))/snapshots/analysis_server.dart.snapshot --lsp"]
|
||||
|
||||
# [language.elixir]
|
||||
# filetypes = ["elixir"]
|
||||
# roots = ["mix.exs"]
|
||||
# command = "elixir-ls"
|
||||
# settings_section = "elixirLS"
|
||||
# [language.elixir.settings.elixirLS]
|
||||
# # See https://github.com/elixir-lsp/elixir-ls/blob/master/apps/language_server/lib/language_server/server.ex
|
||||
# # dialyzerEnable = true
|
||||
|
||||
# [language.elm]
|
||||
# filetypes = ["elm"]
|
||||
# roots = ["elm.json"]
|
||||
# command = "elm-language-server"
|
||||
# args = ["--stdio"]
|
||||
# settings_section = "elmLS"
|
||||
# [language.elm.settings.elmLS]
|
||||
# # See https://github.com/elm-tooling/elm-language-server#server-settings
|
||||
# runtime = "node"
|
||||
# elmPath = "elm"
|
||||
# elmFormatPath = "elm-format"
|
||||
# elmTestPath = "elm-test"
|
||||
|
||||
# [language.go]
|
||||
# filetypes = ["go"]
|
||||
# roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
||||
# command = "gopls"
|
||||
# offset_encoding = "utf-8"
|
||||
# settings_section = "gopls"
|
||||
# [language.go.settings.gopls]
|
||||
# # See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
||||
# # "build.buildFlags" = []
|
||||
|
||||
# [language.haskell]
|
||||
# filetypes = ["haskell"]
|
||||
# roots = ["Setup.hs", "stack.yaml", "*.cabal"]
|
||||
# command = "haskell-language-server-wrapper"
|
||||
# args = ["--lsp"]
|
||||
# settings_section = "haskell"
|
||||
# [language.haskell.settings.haskell]
|
||||
# # See https://github.com/latex-lsp/texlab/blob/e1ee8495b0f54b4411a1ffacf787efa621d8f826/src/options.rs
|
||||
# # formattingProvider = "ormolu"
|
||||
|
||||
[language.html]
|
||||
filetypes = ["html"]
|
||||
roots = ["package.json"]
|
||||
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-html-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
# # Commented out by default because you still need to set the paths in the JDT
|
||||
# # Language Server arguments below before this can become a valid configuration.
|
||||
# [language.java]
|
||||
# filetypes = ["java"]
|
||||
# roots = [".git", "mvnw", "gradlew"]
|
||||
# command = "java"
|
||||
# args = [
|
||||
# "-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
# "-Dosgi.bundles.defaultStartLevel=4",
|
||||
# "-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
# "-Dlog.level=ALL",
|
||||
# "-Dfile.encoding=utf-8",
|
||||
# "--add-modules=ALL-SYSTEM",
|
||||
# "--add-opens",
|
||||
# "java.base/java.util=ALL-UNNAMED",
|
||||
# "--add-opens",
|
||||
# "java.base/java.lang=ALL-UNNAMED",
|
||||
# "-noverify",
|
||||
# "-Xmx1G",
|
||||
# "-jar",
|
||||
# "/path/to/eclipse.jdt.ls/repository/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar",
|
||||
# "-configuration",
|
||||
# "/path/to/eclipse.jdt.ls/repository/config_linux",
|
||||
# "-data",
|
||||
# "/path/to/eclipse-workspace",
|
||||
# ]
|
||||
# [language.java.settings]
|
||||
# # See https://github.dev/eclipse/eclipse.jdt.ls
|
||||
# # "java.format.insertSpaces" = true
|
||||
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableJavascriptSupport ''
|
||||
[language.javascript]
|
||||
filetypes = ["javascript"]
|
||||
roots = [".flowconfig"]
|
||||
command = "${pkgs.flow}/bin/flow"
|
||||
command = "${flow}/bin/flow"
|
||||
args = ["lsp"]
|
||||
|
||||
[language.json]
|
||||
filetypes = ["json"]
|
||||
roots = ["package.json"]
|
||||
command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-json-language-server"
|
||||
args = ["--stdio"]
|
||||
|
||||
# # Requires Julia packages "LanguageServer", "StaticLint" and "SymbolServer"
|
||||
# [language.julia]
|
||||
# filetypes = ["julia"]
|
||||
# roots = ["Project.toml", ".git"]
|
||||
# command = "julia"
|
||||
# args = [
|
||||
# "--startup-file=no",
|
||||
# "--history-file=no",
|
||||
# "-e",
|
||||
# """
|
||||
# using LanguageServer;
|
||||
# using Pkg;
|
||||
# import StaticLint;
|
||||
# import SymbolServer;
|
||||
# import REPL;
|
||||
# env_path = dirname(Pkg.Types.Context().env.project_file);
|
||||
# server = LanguageServer.LanguageServerInstance(stdin, stdout, env_path, "");
|
||||
# server.runlinter = true;
|
||||
# run(server);
|
||||
# """,
|
||||
# ]
|
||||
# [language.julia.settings]
|
||||
# # See https://github.com/julia-vscode/LanguageServer.jl/blob/master/src/requests/workspace.jl
|
||||
# # Format options. See https://github.com/julia-vscode/DocumentFormat.jl/blob/master/src/DocumentFormat.jl
|
||||
# # "julia.format.indent" = 4
|
||||
# # Lint options. See https://github.com/julia-vscode/StaticLint.jl/blob/master/src/linting/checks.jl
|
||||
# # "julia.lint.call" = true
|
||||
# # Other options, see https://github.com/julia-vscode/LanguageServer.jl/blob/master/src/requests/workspace.jl
|
||||
# # "julia.lint.run" = "true"
|
||||
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableLatexSupport ''
|
||||
[language.latex]
|
||||
filetypes = ["latex"]
|
||||
roots = [".git"]
|
||||
command = "${pkgs.texlab}/bin/texlab"
|
||||
command = "${texlab}/bin/texlab"
|
||||
settings_section = "texlab"
|
||||
[language.latex.settings.texlab]
|
||||
# See https://github.com/latex-lsp/texlab/blob/master/src/options.rs
|
||||
bibtexFormatter = "texlab"
|
||||
|
||||
# [language.lua]
|
||||
# filetypes = ["lua"]
|
||||
# roots = [".git"]
|
||||
# command = "lua-language-server"
|
||||
# [language.lua.settings.Lua]
|
||||
# # See https://github.com/sumneko/vscode-lua/blob/master/setting/schema.json
|
||||
# # diagnostics.enable = true
|
||||
|
||||
# [language.nim]
|
||||
# filetypes = ["nim"]
|
||||
# roots = ["*.nimble", ".git"]
|
||||
# command = "nimlsp"
|
||||
|
||||
bibtexFormatter = "${texlab}/bin/texlab"
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableNixSupport ''
|
||||
[language.nix]
|
||||
filetypes = ["nix"]
|
||||
roots = ["flake.nix", "shell.nix", ".git"]
|
||||
command = "${pkgs.rnix-lsp}/bin/rnix-lsp"
|
||||
|
||||
# [language.ocaml]
|
||||
# filetypes = ["ocaml"]
|
||||
# roots = ["Makefile", "opam", "*.opam", "dune"]
|
||||
# command = "ocamllsp"
|
||||
|
||||
# [language.php]
|
||||
# filetypes = ["php"]
|
||||
# roots = [".htaccess", "composer.json"]
|
||||
# command = "intelephense"
|
||||
# args = ["--stdio"]
|
||||
# settings_section = "intelephense"
|
||||
# [language.php.settings]
|
||||
# intelephense.storagePath = "/tmp/intelephense"
|
||||
|
||||
command = "${rnix-lsp}/bin/rnix-lsp"
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enablePythonSupport ''
|
||||
[language.python]
|
||||
filetypes = ["python"]
|
||||
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
||||
command = "${pkgs.python-language-server}/bin/python-language-server"
|
||||
command = "${python3.pkgs.python-lsp-server}/bin/pylsp"
|
||||
offset_encoding = "utf-8"
|
||||
[language.python.settings]
|
||||
# See https://github.com/palantir/python-language-server#configuration
|
||||
# and https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
|
||||
# "pyls.configurationSources" = ["flake8"]
|
||||
|
||||
# [language.reason]
|
||||
# filetypes = ["reason"]
|
||||
# roots = ["package.json", "Makefile", ".git", ".hg"]
|
||||
# command = "ocamllsp"
|
||||
|
||||
# [language.ruby]
|
||||
# filetypes = ["ruby"]
|
||||
# roots = ["Gemfile"]
|
||||
# command = "solargraph"
|
||||
# args = ["stdio"]
|
||||
# [language.ruby.settings]
|
||||
# # See https://github.com/castwide/solargraph/blob/master/lib/solargraph/language_server/host.rb
|
||||
# # "solargraph.completion" = true
|
||||
|
||||
# [language.rust]
|
||||
# filetypes = ["rust"]
|
||||
# roots = ["Cargo.toml"]
|
||||
# command = "sh"
|
||||
# args = [
|
||||
# "-c",
|
||||
# """
|
||||
# if path=$(rustup which rls 2>/dev/null); then
|
||||
# "$path"
|
||||
# else
|
||||
# rls
|
||||
# fi
|
||||
# """,
|
||||
# ]
|
||||
# [language.rust.settings.rust]
|
||||
# # See https://github.com/rust-lang/rls#configuration
|
||||
# # features = []
|
||||
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableRustSupport ''
|
||||
[language.rust]
|
||||
filetypes = ["rust"]
|
||||
roots = ["Cargo.toml"]
|
||||
command = "${pkgs.rust-analyzer}/bin/rust-analyzer"
|
||||
command = "${rust-analyzer}/bin/rust-analyzer"
|
||||
settings_section = "rust-analyzer"
|
||||
[language.rust.settings.rust-analyzer]
|
||||
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
||||
|
|
@ -442,31 +334,18 @@ in
|
|||
procMacro.enable = true
|
||||
cargo.loadOutDirsFromCheck = true
|
||||
# See https://github.com/rust-analyzer/rust-analyzer/issues/6448
|
||||
|
||||
# [language.terraform]
|
||||
# filetypes = ["terraform"]
|
||||
# roots = ["*.tf"]
|
||||
# command = "terraform-ls"
|
||||
# args = ["serve"]
|
||||
# [language.terraform.settings.terraform-ls]
|
||||
# # See https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md
|
||||
# # rootModulePaths = []
|
||||
|
||||
[language.yaml]
|
||||
filetypes = ["yaml"]
|
||||
roots = [".git"]
|
||||
command = "${pkgs.yaml-language-server}/bin/yaml-language-server"
|
||||
args = ["--stdio"]
|
||||
[language.yaml.settings]
|
||||
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
||||
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
||||
yaml.format.enable = true
|
||||
|
||||
# [language.zig]
|
||||
# filetypes = ["zig"]
|
||||
# roots = ["build.zig"]
|
||||
# command = "zls"
|
||||
|
||||
''
|
||||
) ++ (
|
||||
lib.optional cfg.enableShellSupport ''
|
||||
[language.bash]
|
||||
filetypes = ["sh"]
|
||||
roots = [".git", ".hg"]
|
||||
command = "${nodePackages.bash-language-server}/bin/bash-language-server"
|
||||
args = ["start"]
|
||||
''
|
||||
)
|
||||
++ [
|
||||
''
|
||||
# Semantic tokens support
|
||||
# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
|
||||
# for the default list of tokens and modifiers.
|
||||
|
|
@ -520,15 +399,17 @@ in
|
|||
|
||||
[[semantic_tokens]]
|
||||
token = "variable"
|
||||
face = "variable"
|
||||
'';
|
||||
face = "variable"''
|
||||
]
|
||||
);
|
||||
|
||||
xdg.dataFile."applications/kakoune.desktop".source =
|
||||
let
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
desktopItem = pkgs.makeDesktopItem
|
||||
{
|
||||
name = "kakoune";
|
||||
type = "Application";
|
||||
exec = "${kakCmd} %U";
|
||||
exec = "kak %U";
|
||||
icon = "kakoune";
|
||||
desktopName = "Kakoune";
|
||||
comment = "Kakoune text editor";
|
||||
|
|
@ -537,5 +418,6 @@ in
|
|||
mimeType = "text/plain;text/*";
|
||||
};
|
||||
in
|
||||
builtins.toPath "${desktopItem}/share/applications/kakoune.desktop";
|
||||
builtins.toPath
|
||||
"${desktopItem}/share/applications/kakoune.desktop";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue