kak-lsp: update config to new format
This commit is contained in:
parent
7418ee0538
commit
219daf83da
|
@ -7,7 +7,7 @@ verbosity = 2
|
||||||
# set to 0 to disable
|
# set to 0 to disable
|
||||||
timeout = 1800 # seconds = 30 minutes
|
timeout = 1800 # seconds = 30 minutes
|
||||||
|
|
||||||
[language.angular]
|
[language_server.angular]
|
||||||
filetypes = ["angular"]
|
filetypes = ["angular"]
|
||||||
roots = [".angular", ".git"]
|
roots = [".angular", ".git"]
|
||||||
command = "node"
|
command = "node"
|
||||||
|
@ -20,134 +20,80 @@ args = [
|
||||||
"--stdio",
|
"--stdio",
|
||||||
]
|
]
|
||||||
|
|
||||||
[language.bash]
|
[language_server.bash-language-server]
|
||||||
filetypes = ["sh"]
|
filetypes = ["sh"]
|
||||||
roots = [".git", ".hg"]
|
roots = [".git", ".hg"]
|
||||||
command = "bash-language-server"
|
command = "bash-language-server"
|
||||||
args = ["start"]
|
args = ["start"]
|
||||||
|
|
||||||
[language.c_cpp]
|
[language_server.clangd]
|
||||||
filetypes = ["c", "cpp"]
|
filetypes = ["c", "cpp"]
|
||||||
roots = [ "compile_commands.json", ".clangd", ".git" ]
|
roots = ["compile_commands.json", ".clangd", ".git", ".hg"]
|
||||||
command = "clangd"
|
command = "clangd"
|
||||||
|
|
||||||
[language.crystal]
|
[language_server.css-language-server]
|
||||||
filetypes = ["crystal"]
|
|
||||||
roots = ["shard.yml"]
|
|
||||||
command = "scry"
|
|
||||||
|
|
||||||
[language.css]
|
|
||||||
filetypes = ["css"]
|
filetypes = ["css"]
|
||||||
roots = ["package.json"]
|
roots = ["package.json", ".git", ".hg"]
|
||||||
command = "vscode-css-languageserver"
|
command = "vscode-css-languageserver"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
|
|
||||||
[language.less]
|
[language_server.less-language-server]
|
||||||
filetypes = ["less"]
|
filetypes = ["less"]
|
||||||
roots = ["package.json", ".git"]
|
roots = ["package.json", ".git", ".hg"]
|
||||||
command = "vscode-css-languageserver"
|
command = "vscode-css-languageserver"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
|
|
||||||
[language.d]
|
[language_server.html-language-server]
|
||||||
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 $(which dart))/snapshots/analysis_server.dart.snapshot --lsp"]
|
|
||||||
|
|
||||||
[language.elm]
|
|
||||||
filetypes = ["elm"]
|
|
||||||
roots = ["elm.json"]
|
|
||||||
command = "elm-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
|
|
||||||
# [language.elm.initialization_options]
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
[language.haskell]
|
|
||||||
filetypes = ["haskell"]
|
|
||||||
roots = ["Setup.hs", "stack.yaml", "*.cabal"]
|
|
||||||
command = "haskell-language-server-wrapper"
|
|
||||||
args = ["--lsp"]
|
|
||||||
|
|
||||||
[language.html]
|
|
||||||
filetypes = ["html"]
|
filetypes = ["html"]
|
||||||
roots = ["package.json"]
|
roots = ["package.json"]
|
||||||
command = "vscode-html-languageserver"
|
command = "vscode-html-languageserver"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
|
settings_section = "_"
|
||||||
|
[language_server.html-language-server.settings._]
|
||||||
|
# quotePreference = "single"
|
||||||
|
# javascript.format.semicolons = "insert"
|
||||||
|
|
||||||
[language.javascript]
|
[language_server.typescript-language-server]
|
||||||
filetypes = ["javascript"]
|
filetypes = ["javascript", "typescript"]
|
||||||
roots = [".flowconfig"]
|
roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
|
||||||
command = "flow"
|
|
||||||
args = ["lsp"]
|
|
||||||
|
|
||||||
[language.typescript]
|
|
||||||
filetypes = ["typescript"]
|
|
||||||
roots = ["package.json"]
|
|
||||||
command = "typescript-language-server"
|
command = "typescript-language-server"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
|
settings_section = "_"
|
||||||
|
[language_server.typescript-language-server.settings._]
|
||||||
|
# quotePreference = "double"
|
||||||
|
# typescript.format.semicolons = "insert"
|
||||||
|
|
||||||
[language.json]
|
[language_server.json-language-server]
|
||||||
filetypes = ["json"]
|
filetypes = ["json"]
|
||||||
roots = ["package.json"]
|
roots = ["package.json"]
|
||||||
command = "vscode-json-languageserver"
|
command = "vscode-json-languageserver"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
|
|
||||||
[language.latex]
|
[language_server.rnix-lsp]
|
||||||
filetypes = ["latex"]
|
|
||||||
roots = [".git"]
|
|
||||||
command = "texlab"
|
|
||||||
|
|
||||||
[language.nim]
|
|
||||||
filetypes = ["nim"]
|
|
||||||
roots = ["*.nimble", ".git"]
|
|
||||||
command = "nimlsp"
|
|
||||||
|
|
||||||
[language.nix]
|
|
||||||
filetypes = ["nix"]
|
filetypes = ["nix"]
|
||||||
command = "nil"
|
command = "nil"
|
||||||
roots = ["flake.nix", "shell.nix", ".git"]
|
roots = ["flake.nix", "shell.nix", ".git"]
|
||||||
[language.nix.settings.nil]
|
[language.nix.settings.nil]
|
||||||
formatting.command = [ "nixpkgs-fmt" ]
|
formatting.command = [ "nixpkgs-fmt" ]
|
||||||
|
|
||||||
[language.ocaml]
|
[language_server.intelephense]
|
||||||
filetypes = ["ocaml"]
|
|
||||||
roots = ["Makefile", "opam", "*.opam", "dune"]
|
|
||||||
command = "ocaml-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
|
|
||||||
[language.php]
|
|
||||||
filetypes = ["php"]
|
filetypes = ["php"]
|
||||||
roots = [".htaccess", "composer.json"]
|
roots = [".htaccess", "composer.json"]
|
||||||
command = "intelephense"
|
command = "intelephense"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
settings_section = "intelephense"
|
settings_section = "intelephense"
|
||||||
[language.php.settings]
|
[language_server.intelephense.settings.intelephense]
|
||||||
intelephense.format.braces = "k&r"
|
storagePath = "/tmp/intelephense"
|
||||||
intelephense.storagePath = "/tmp/intelephense"
|
|
||||||
intelephense.environment.includePaths = [
|
format.braces = "k&r"
|
||||||
|
environment.includePaths = [
|
||||||
"./vendor",
|
"./vendor",
|
||||||
"./vendor/autoload",
|
"./vendor/autoload",
|
||||||
"./vendor/laravel/framework/",
|
"./vendor/laravel/framework/",
|
||||||
"./vendor/laravel/framework/src/",
|
"./vendor/laravel/framework/src/",
|
||||||
"./vendor/laravel/framework/src/Illuminate/"
|
"./vendor/laravel/framework/src/Illuminate/"
|
||||||
]
|
]
|
||||||
intelephense.files.exclude = [
|
files.exclude = [
|
||||||
"**/.git/**",
|
"**/.git/**",
|
||||||
"**/.svn/**",
|
"**/.svn/**",
|
||||||
"**/.hg/**",
|
"**/.hg/**",
|
||||||
|
@ -159,42 +105,9 @@ intelephense.files.exclude = [
|
||||||
"**/resources/views/**"
|
"**/resources/views/**"
|
||||||
]
|
]
|
||||||
|
|
||||||
[language.python]
|
[language_server.rust-analyzer]
|
||||||
filetypes = ["python"]
|
|
||||||
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
|
||||||
command = "pyls"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
|
|
||||||
[language.reason]
|
|
||||||
filetypes = ["reason"]
|
|
||||||
roots = ["package.json", "Makefile", ".git", ".hg"]
|
|
||||||
command = "ocaml-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
|
|
||||||
[language.ruby]
|
|
||||||
filetypes = ["ruby"]
|
|
||||||
roots = ["Gemfile"]
|
|
||||||
command = "solargraph"
|
|
||||||
args = ["stdio"]
|
|
||||||
|
|
||||||
# [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]
|
|
||||||
filetypes = ["rust"]
|
filetypes = ["rust"]
|
||||||
roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"]
|
roots = ["Cargo.toml"]
|
||||||
command = "sh"
|
command = "sh"
|
||||||
args = [
|
args = [
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -206,99 +119,37 @@ args = [
|
||||||
fi
|
fi
|
||||||
""",
|
""",
|
||||||
]
|
]
|
||||||
[language.rust.settings.rust-analyzer]
|
[language_server.rust-analyzer.settings.rust-analyzer]
|
||||||
## this can use too much space and processing power
|
# See https://rust-analyzer.github.io/manual.html#configuration
|
||||||
# checkOnSave.extraArgs = ["--target-dir", "./target/check"]
|
# cargo.features = []
|
||||||
checkOnSave.command = "clippy"
|
checkOnSave.command = "clippy"
|
||||||
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
||||||
# procMacro.enable = true
|
|
||||||
# cargo.loadOutDirsFromCheck = true
|
|
||||||
# rustfmt.rangeFormatting.enable = true
|
|
||||||
# rustfmt.extraArgs = ["+nightly"]
|
|
||||||
|
|
||||||
[language.terraform]
|
[language_server.godot]
|
||||||
filetypes = ["terraform"]
|
|
||||||
roots = ["*.tf"]
|
|
||||||
command = "terraform-ls"
|
|
||||||
args = ["serve"]
|
|
||||||
|
|
||||||
[language.godot]
|
|
||||||
filetypes = ["gd", "gdscript", "gdscript3"]
|
filetypes = ["gd", "gdscript", "gdscript3"]
|
||||||
roots = ["project.godot", ".git/"]
|
roots = ["project.godot", ".git/"]
|
||||||
command = "nc"
|
command = "nc"
|
||||||
args = [ "localhost", "6008"]
|
args = [ "localhost", "6008"]
|
||||||
|
|
||||||
[language.clojure]
|
# Semantic tokens support
|
||||||
filetypes = ["clojure"]
|
# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
|
||||||
roots = ["project.clj", ".git/"]
|
# for the default list of tokens and modifiers.
|
||||||
command = "clojure-lsp"
|
# However, many language servers implement their own values.
|
||||||
args = []
|
# Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well.
|
||||||
|
# Examples:
|
||||||
|
# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts
|
||||||
|
# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs
|
||||||
|
[semantic_tokens]
|
||||||
[semantic_scopes]
|
faces = [
|
||||||
# Map textmate scopes to kakoune faces for semantic highlighting
|
{face="documentation", token="comment", modifiers=["documentation"]},
|
||||||
# the underscores are translated to dots, and indicate nesting.
|
{face="comment", token="comment"},
|
||||||
# That is, if variable_other_field is omitted, it will try the face for
|
{face="function", token="function"},
|
||||||
# variable_other and then variable
|
{face="keyword", token="keyword"},
|
||||||
#
|
{face="module", token="namespace"},
|
||||||
# To see a list of available scopes in the debug buffer, run lsp-semantic-available-scopes
|
{face="operator", token="operator"},
|
||||||
variable = "variable"
|
{face="string", token="string"},
|
||||||
entity_name_function = "function"
|
{face="type", token="type"},
|
||||||
entity_name_type = "type"
|
{face="default+d", token="variable", modifiers=["readonly"]},
|
||||||
variable_other_enummember = "variable"
|
{face="default+d", token="variable", modifiers=["constant"]},
|
||||||
entity_name_namespace = "module"
|
{face="variable", token="variable"},
|
||||||
|
]
|
||||||
[semantic_modifiers]
|
|
||||||
documentation = "documentation"
|
|
||||||
readonly = "default+d"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "comment"
|
|
||||||
face = "documentation"
|
|
||||||
modifiers = ["documentation"]
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "comment"
|
|
||||||
face = "comment"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "function"
|
|
||||||
face = "function"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "keyword"
|
|
||||||
face = "keyword"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "namespace"
|
|
||||||
face = "module"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "operator"
|
|
||||||
face = "operator"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "string"
|
|
||||||
face = "string"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "type"
|
|
||||||
face = "type"
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "variable"
|
|
||||||
face = "default+d"
|
|
||||||
modifiers = ["readonly"]
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "variable"
|
|
||||||
face = "default+d"
|
|
||||||
modifiers = ["constant"]
|
|
||||||
|
|
||||||
[[semantic_tokens]]
|
|
||||||
token = "variable"
|
|
||||||
face = "variable"
|
|
||||||
|
|
Loading…
Reference in a new issue