Add simple completion language server and snippets to helix
This commit is contained in:
parent
aef17801f6
commit
f909759031
|
@ -36,14 +36,14 @@
|
|||
language-id = "python";
|
||||
auto-format = true;
|
||||
file-types = ["py"];
|
||||
language-servers = ["ruff"];
|
||||
language-servers = ["ruff" "scls"];
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
language-id = "typst";
|
||||
auto-format = false;
|
||||
file-types = ["typ"];
|
||||
language-servers = ["typst-lsp"];
|
||||
language-servers = ["typst-lsp" "scls"];
|
||||
}
|
||||
{
|
||||
name = "rust";
|
||||
|
@ -51,7 +51,16 @@
|
|||
auto-format = true;
|
||||
file-types = ["rs"];
|
||||
roots = ["Cargo.lock"];
|
||||
language-servers = ["rust-analyzer"];
|
||||
language-servers = ["rust-analyzer" "scls"];
|
||||
}
|
||||
{
|
||||
name = "stub";
|
||||
scope = "text.stub";
|
||||
file-types = [];
|
||||
shebangs = [];
|
||||
roots = [];
|
||||
auto-format = false;
|
||||
language-servers = ["scls"];
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
|
@ -79,7 +88,24 @@
|
|||
nil = {
|
||||
command = "nil";
|
||||
};
|
||||
scls = {
|
||||
command = "simple-completion-language-server";
|
||||
config = {
|
||||
max_completion_items = 20;
|
||||
snippets_first = true;
|
||||
feature_words = true;
|
||||
feature_snippets = true;
|
||||
feature_unicode_input = true;
|
||||
feature_paths = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
"helix" = {
|
||||
source = ./snippets.toml;
|
||||
target = ".config/helix/external-snippets.toml";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
3
home-manager/shared/shell/snippets.toml
Normal file
3
home-manager/shared/shell/snippets.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[[sources]] # list of sources to load
|
||||
name = "friendly-snippets" # optional name shown on snippet description
|
||||
git = "https://github.com/rafamadriz/friendly-snippets.git" # git repo with snippets collections
|
Loading…
Reference in a new issue