Little refactor for the shell scripts
This commit is contained in:
parent
ccf1e416cf
commit
2e0fd8c174
5 changed files with 2 additions and 2 deletions
111
home-manager/shared/shell/helix/default.nix
Normal file
111
home-manager/shared/shell/helix/default.nix
Normal file
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
theme = "catppuccin_macchiato";
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
lsp.display-messages = true;
|
||||
lsp.display-inlay-hints = true;
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
cursorline = true;
|
||||
bufferline = "always";
|
||||
color-modes = true;
|
||||
soft-wrap = {
|
||||
enable = true;
|
||||
max-wrap = 25;
|
||||
wrap-indicator = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "python";
|
||||
language-id = "python";
|
||||
auto-format = true;
|
||||
file-types = ["py"];
|
||||
language-servers = ["ruff" "scls"];
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
language-id = "typst";
|
||||
auto-format = false;
|
||||
file-types = ["typ"];
|
||||
language-servers = ["typst-lsp" "scls"];
|
||||
}
|
||||
{
|
||||
name = "rust";
|
||||
language-id = "rust";
|
||||
auto-format = true;
|
||||
file-types = ["rs"];
|
||||
roots = ["Cargo.lock"];
|
||||
language-servers = ["rust-analyzer" "scls"];
|
||||
}
|
||||
{
|
||||
name = "stub";
|
||||
scope = "text.stub";
|
||||
file-types = [];
|
||||
shebangs = [];
|
||||
roots = [];
|
||||
auto-format = false;
|
||||
language-servers = ["scls"];
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
language-id = "nix";
|
||||
auto-format = true;
|
||||
file-types = ["nix"];
|
||||
roots = ["flake.lock" "flake.nix"];
|
||||
language-servers = ["nil" "scls"];
|
||||
formatter = {
|
||||
command = "alejandra";
|
||||
args = ["-q"];
|
||||
};
|
||||
}
|
||||
];
|
||||
language-server = {
|
||||
ruff = {
|
||||
command = "ruff-lsp";
|
||||
};
|
||||
typst-lsp = {
|
||||
command = "typst-lsp";
|
||||
};
|
||||
rust-analyzer = {
|
||||
command = "rust-analyzer";
|
||||
};
|
||||
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/helix/snippets.toml
Normal file
3
home-manager/shared/shell/helix/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…
Add table
Add a link
Reference in a new issue