fix/helix language-server rust
This commit is contained in:
parent
514949c05e
commit
9ae3e9f6fc
@ -13,24 +13,23 @@ roots = [
|
|||||||
'[' = ']'
|
'[' = ']'
|
||||||
'"' = '"'
|
'"' = '"'
|
||||||
'`' = '`'
|
'`' = '`'
|
||||||
'<' = '>'
|
|
||||||
|
|
||||||
[language-server.rust-analyzer]
|
[language-server.rust-analyzer]
|
||||||
command = "rust-analyzer"
|
command = "rust-analyzer"
|
||||||
|
|
||||||
[language-server.rust-analyzer.config.check]
|
|
||||||
config.check.command = "clippy"
|
|
||||||
|
|
||||||
[language-server.rust-analyzer.config]
|
[language-server.rust-analyzer.config]
|
||||||
|
inlayHints.bindingModeHints.enable = true
|
||||||
inlayHints.closingBraceHints.minLines = 10
|
inlayHints.closingBraceHints.minLines = 10
|
||||||
inlayHints.closureReturnTypeHints.enable = "with_block"
|
inlayHints.closureReturnTypeHints.enable = "with_block"
|
||||||
|
inlayHints.discriminantHints.enable = "fieldless"
|
||||||
|
inlayHints.lifetimeElisionHints.enable = "skip_trivial"
|
||||||
inlayHints.typeHints.hideClosureInitialization = false
|
inlayHints.typeHints.hideClosureInitialization = false
|
||||||
# inlayHints.bindingModeHints.enable = false
|
|
||||||
# inlayHints.discriminantHints.enable = "fieldless"
|
|
||||||
# inlayHints.lifetimeElisionHints.enable = "skip_trivial"
|
|
||||||
|
|
||||||
|
diagnostics.enableInlineHints = true
|
||||||
|
|
||||||
|
check.command = "clippy"
|
||||||
|
checkOnSave.command = "clippy"
|
||||||
|
|
||||||
|
[keys.normal]
|
||||||
|
C-t = ":run-shell-command cargo test -- --nocapture"
|
||||||
|
|
||||||
[[language]]
|
|
||||||
name = "go"
|
|
||||||
auto-format = true
|
|
||||||
formatter = { command = "goimports" }
|
|
||||||
|
58
home.nix
58
home.nix
@ -77,50 +77,6 @@
|
|||||||
helix = {
|
helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
# languages = {
|
|
||||||
# rust = {
|
|
||||||
# enable = true;
|
|
||||||
# language-servers = ["rust-analyzer"];
|
|
||||||
# language-server.rust-analyzer = {
|
|
||||||
# command = "rustup run rust-analyzer";
|
|
||||||
# config = {
|
|
||||||
# check.command = "clippy";
|
|
||||||
# # diagnostics.disabled = ["inactive-code"];
|
|
||||||
# diagnostics.enableInlineHints = true;
|
|
||||||
# # inlay-hints.enabled = true;
|
|
||||||
# # inlay-hints.max-length = 25;
|
|
||||||
# # lens.enabled = true;
|
|
||||||
# # lens.run.enable = true;
|
|
||||||
# # completion.postfix.enable = true;
|
|
||||||
# # assist.importMergeBehavior = "full";
|
|
||||||
# # callInfo.full = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
languages = {
|
|
||||||
rust = {
|
|
||||||
enable = true;
|
|
||||||
language-servers = ["rust-analyzer"];
|
|
||||||
language-server = {
|
|
||||||
rust-analyzer = {
|
|
||||||
# command = "rust-analyzer";
|
|
||||||
command = "rustup run rust-analyzer";
|
|
||||||
config = {
|
|
||||||
check.command = "clippy";
|
|
||||||
diagnostics.enableInlineHints = true;
|
|
||||||
inlay-hints.enabled = true;
|
|
||||||
# inlay-hints.max-length = 25;
|
|
||||||
lens.enabled = true;
|
|
||||||
lens.run.enable = true;
|
|
||||||
completion.postfix.enable = true;
|
|
||||||
assist.importMergeBehavior = "full";
|
|
||||||
callInfo.full = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
settings = {
|
settings = {
|
||||||
theme = "onedark";
|
theme = "onedark";
|
||||||
editor = {
|
editor = {
|
||||||
@ -129,6 +85,8 @@
|
|||||||
auto-completion = true;
|
auto-completion = true;
|
||||||
auto-save = true;
|
auto-save = true;
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
|
soft-wrap.enable = true;
|
||||||
|
soft-wrap.max-indent-retain = 80;
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
gutters = [
|
gutters = [
|
||||||
"diff"
|
"diff"
|
||||||
@ -181,14 +139,13 @@
|
|||||||
};
|
};
|
||||||
keys.insert.j.k = "normal_mode";
|
keys.insert.j.k = "normal_mode";
|
||||||
keys.insert."C-c" = "normal_mode";
|
keys.insert."C-c" = "normal_mode";
|
||||||
|
keys.insert."C-right" = ["move_next_word_end" "move_char_right"];
|
||||||
|
keys.insert."C-left" = "move_prev_word_start";
|
||||||
|
|
||||||
keys.normal.g.a = "code_action";
|
keys.normal.g.a = "code_action";
|
||||||
keys.normal.backspace = {
|
keys.normal."C-s" = ":w";
|
||||||
r = ":run-shell-command cargo run";
|
keys.normal."C-right" = ["move_next_word_end" "move_char_right"];
|
||||||
t = ":run-shell-command cargo test";
|
keys.normal."C-left" = "move_prev_word_start";
|
||||||
b = ":run-shell-command cargo build";
|
|
||||||
c = ":run-shell-command cargo check";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -389,6 +346,7 @@
|
|||||||
home.file = {
|
home.file = {
|
||||||
".config/hypr/hyprlock.conf".source = ./dotfiles/hypr/hyprlock.conf;
|
".config/hypr/hyprlock.conf".source = ./dotfiles/hypr/hyprlock.conf;
|
||||||
".config/waybar".source = ./dotfiles/waybar;
|
".config/waybar".source = ./dotfiles/waybar;
|
||||||
|
".config/helix/languages.toml".source = ./dotfiles/helix/languages.toml;
|
||||||
".config/rofi/config.rasi".source = ./dotfiles/rofi/config.rasi;
|
".config/rofi/config.rasi".source = ./dotfiles/rofi/config.rasi;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
building the system configuration...
|
|
Loading…
x
Reference in New Issue
Block a user