nixos-config/user/kakoune/kak-lsp.toml

156 lines
4.6 KiB
TOML
Raw Normal View History

2022-08-30 22:19:40 -03:00
snippet_support = false
2022-08-25 12:08:54 -03:00
verbosity = 2
[server]
# exit session if no requests were received during given period in seconds
# works only in unix sockets mode (-s/--session)
# set to 0 to disable
timeout = 1800 # seconds = 30 minutes
2024-02-16 01:17:58 -03:00
[language_server.angular]
filetypes = ["angular"]
roots = [".angular", ".git"]
command = "node"
args = [
"/home/lelgenio/.config/yarn/global/node_modules/@angular/language-server",
"--ngProbeLocations",
"/home/lelgenio/.config/yarn/global/node_modules",
"--tsProbeLocations",
"/home/lelgenio/.config/yarn/global/node_modules",
"--stdio",
]
2024-02-16 01:17:58 -03:00
[language_server.bash-language-server]
2022-08-25 12:08:54 -03:00
filetypes = ["sh"]
roots = [".git", ".hg"]
command = "bash-language-server"
args = ["start"]
2024-02-16 01:17:58 -03:00
[language_server.clangd]
2022-08-25 12:08:54 -03:00
filetypes = ["c", "cpp"]
2024-02-16 01:17:58 -03:00
roots = ["compile_commands.json", ".clangd", ".git", ".hg"]
2022-08-25 12:08:54 -03:00
command = "clangd"
2024-02-16 01:17:58 -03:00
[language_server.css-language-server]
2022-08-25 12:08:54 -03:00
filetypes = ["css"]
2024-02-16 01:17:58 -03:00
roots = ["package.json", ".git", ".hg"]
2022-08-25 12:08:54 -03:00
command = "vscode-css-languageserver"
args = ["--stdio"]
2024-02-16 01:17:58 -03:00
[language_server.less-language-server]
2022-08-25 12:08:54 -03:00
filetypes = ["less"]
2024-02-16 01:17:58 -03:00
roots = ["package.json", ".git", ".hg"]
2022-08-25 12:08:54 -03:00
command = "vscode-css-languageserver"
args = ["--stdio"]
2024-02-16 01:17:58 -03:00
[language_server.html-language-server]
2022-08-25 12:08:54 -03:00
filetypes = ["html"]
roots = ["package.json"]
command = "vscode-html-languageserver"
args = ["--stdio"]
2024-02-16 01:17:58 -03:00
settings_section = "_"
[language_server.html-language-server.settings._]
# quotePreference = "single"
# javascript.format.semicolons = "insert"
[language_server.typescript-language-server]
filetypes = ["javascript", "typescript"]
roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
2022-08-25 12:08:54 -03:00
command = "typescript-language-server"
args = ["--stdio"]
2024-02-16 01:17:58 -03:00
settings_section = "_"
[language_server.typescript-language-server.settings._]
# quotePreference = "double"
# typescript.format.semicolons = "insert"
2022-08-25 12:08:54 -03:00
2024-02-16 01:17:58 -03:00
[language_server.json-language-server]
2022-08-25 12:08:54 -03:00
filetypes = ["json"]
roots = ["package.json"]
command = "vscode-json-languageserver"
args = ["--stdio"]
2024-03-15 23:08:35 -03:00
[language_server.nil]
2022-08-25 12:08:54 -03:00
filetypes = ["nix"]
2024-03-15 23:08:35 -03:00
command = "nil"
2022-08-25 12:08:54 -03:00
roots = ["flake.nix", "shell.nix", ".git"]
2024-03-15 23:08:35 -03:00
[language_server.nil.settings.nil]
2024-05-30 16:54:23 -03:00
formatting.command = [ "nixfmt" ]
2022-08-25 12:08:54 -03:00
2024-02-16 01:17:58 -03:00
[language_server.intelephense]
2022-08-25 12:08:54 -03:00
filetypes = ["php"]
roots = [".htaccess", "composer.json"]
command = "intelephense"
args = ["--stdio"]
settings_section = "intelephense"
2024-02-16 01:17:58 -03:00
[language_server.intelephense.settings.intelephense]
storagePath = "/tmp/intelephense"
format.braces = "k&r"
environment.includePaths = [
2022-08-25 12:08:54 -03:00
"./vendor",
"./vendor/autoload",
"./vendor/laravel/framework/",
"./vendor/laravel/framework/src/",
"./vendor/laravel/framework/src/Illuminate/"
]
2024-02-16 01:17:58 -03:00
files.exclude = [
2022-08-25 12:08:54 -03:00
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
2024-01-19 16:09:13 -03:00
"**/.direnv/**",
2022-08-25 12:08:54 -03:00
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/resources/views/**"
]
2024-02-16 01:17:58 -03:00
[language_server.rust-analyzer]
2022-08-25 12:08:54 -03:00
filetypes = ["rust"]
2024-02-16 01:17:58 -03:00
roots = ["Cargo.toml"]
2022-08-25 12:08:54 -03:00
command = "sh"
args = [
"-c",
"""
if path=$(rustup which rust-analyzer 2>/dev/null); then
"$path"
else
rust-analyzer
fi
""",
]
2024-02-16 01:17:58 -03:00
[language_server.rust-analyzer.settings.rust-analyzer]
# See https://rust-analyzer.github.io/manual.html#configuration
# cargo.features = []
checkOnSave.command = "clippy"
2022-08-25 12:08:54 -03:00
hoverActions.enable = false # kak-lsp doesn't support this at the moment
2024-02-16 01:17:58 -03:00
[language_server.godot]
2022-08-25 12:08:54 -03:00
filetypes = ["gd", "gdscript", "gdscript3"]
roots = ["project.godot", ".git/"]
command = "nc"
args = [ "localhost", "6008"]
2024-02-16 01:17:58 -03:00
# Semantic tokens support
# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
# for the default list of tokens and modifiers.
# However, many language servers implement their own values.
# 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]
faces = [
{face="documentation", token="comment", modifiers=["documentation"]},
{face="comment", token="comment"},
{face="function", token="function"},
{face="keyword", token="keyword"},
{face="module", token="namespace"},
{face="operator", token="operator"},
{face="string", token="string"},
{face="type", token="type"},
{face="default+d", token="variable", modifiers=["readonly"]},
{face="default+d", token="variable", modifiers=["constant"]},
{face="variable", token="variable"},
]