Add neovim rust formatting
This commit is contained in:
parent
1624cf7a21
commit
25855e6dc0
2 changed files with 12 additions and 8 deletions
|
@ -1,13 +1,14 @@
|
||||||
{
|
{ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, # vars,
|
||||||
# vars,
|
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
vars = import ../../../../vars.nix;
|
vars = import ../../../../vars.nix;
|
||||||
colors = config.colorScheme.colors;
|
colors = config.colorScheme.colors;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.sessionVariables.EDITOR = "nvim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
|
@ -28,6 +29,7 @@ in {
|
||||||
black # pyton
|
black # pyton
|
||||||
alejandra # nix
|
alejandra # nix
|
||||||
clang-tools_16 # c/c++
|
clang-tools_16 # c/c++
|
||||||
|
rustfmt
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
ruff # python
|
ruff # python
|
||||||
|
@ -231,7 +233,7 @@ in {
|
||||||
];
|
];
|
||||||
terminal = true;
|
terminal = true;
|
||||||
type = "Application";
|
type = "Application";
|
||||||
categories = ["Utility" "TextEditor"];
|
categories = [ "Utility" "TextEditor" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ local opts = {
|
||||||
null_ls.builtins.formatting.clang_format,
|
null_ls.builtins.formatting.clang_format,
|
||||||
-- Nix
|
-- Nix
|
||||||
null_ls.builtins.formatting.alejandra,
|
null_ls.builtins.formatting.alejandra,
|
||||||
|
-- Rust
|
||||||
|
null_ls.builtins.formatting.rustfmt,
|
||||||
},
|
},
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
|
Loading…
Reference in a new issue