Skip to content

Commit

Permalink
chore: enable lsp-format and improve rust-analyzer settings
Browse files Browse the repository at this point in the history
  • Loading branch information
BastianAsmussen committed Jan 3, 2025
1 parent 8938962 commit c641eba
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/terminal/nixvim/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
gitsigns = import ./gitsigns.nix config;
hardtime.enable = true;
indent-blankline.enable = true;
lsp-format.enable = true;
lspkind = import ./lspkind.nix;
lualine = import ./lualine.nix;
luasnip = import ./luasnip.nix pkgs;
Expand Down
47 changes: 25 additions & 22 deletions modules/home-manager/terminal/nixvim/plugins/rustaceanvim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,35 @@ pkgs: {
enable = true;

settings = {
server.default_settings.rust-analyzer = {
check.command = "clippy";
assist = {
emitMustUse = true;
expressionFillDefault = "default";
};
server = {
load_vscode_settings = true;
default_settings.rust-analyzer = {
check.command = "clippy";
assist = {
emitMustUse = true;
expressionFillDefault = "default";
};

completion.termSearch.enable = true;
diagnostics.styleLints.enable = true;
imports = {
granularity.enforce = true;
preferPrelude = true;
};
completion.termSearch.enable = true;
diagnostics.styleLints.enable = true;
imports = {
granularity.enforce = true;
preferPrelude = true;
};

inlayHints = {
closureReturnTypeHints.enable = "always";
closureStyle = "rust_analyzer";
lifetimeElisionHints.enable = "skip_trivial";
};
inlayHints = {
closureReturnTypeHints.enable = "always";
closureStyle = "rust_analyzer";
lifetimeElisionHints.enable = "skip_trivial";
};

typing.autoClosingAngleBrackets.enable = true;
};
typing.autoClosingAngleBrackets.enable = true;
};

dap.adapter = {
command = "${pkgs.lldb}/bin/lldb-dap";
type = "executable";
dap.adapter = {
command = "${pkgs.lldb}/bin/lldb-dap";
type = "executable";
};
};
};
}

0 comments on commit c641eba

Please sign in to comment.