feat(nvim): upgrade to nvim v10 and nixvim unstable

This commit is contained in:
Michael Thomas 2024-07-30 13:39:06 -04:00
parent faa11b525a
commit e7c5986b79
5 changed files with 41 additions and 38 deletions

View File

@ -22,8 +22,8 @@
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix.url = "github:numtide/treefmt-nix";
nixvim = {
url = "github:nix-community/nixvim/nixos-24.05";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "unstable";
};
rust-overlay.url = "github:oxalica/rust-overlay";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";

View File

@ -1,8 +1,11 @@
{
plugins.treesitter = {
enable = true;
indent = true;
folding = true;
nixvimInjections = true;
settings = {
highlight.enable = true;
indent.enable = true;
};
};
}

View File

@ -2,21 +2,23 @@
plugins.none-ls = {
enable = false;
enableLspFormat = false;
updateInInsert = false;
onAttach = ''
function(client, bufnr)
if client.supports_method "textDocument/formatting" then
vim.api.nvim_clear_autocmds { group = augroup, buffer = bufnr }
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format { bufnr = bufnr }
end,
})
settings = {
update_in_insert = false;
on_attach = ''
function(client, bufnr)
if client.supports_method "textDocument/formatting" then
vim.api.nvim_clear_autocmds { group = augroup, buffer = bufnr }
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format { bufnr = bufnr }
end,
})
end
end
end
'';
'';
};
sources = {
code_actions = {
gitsigns.enable = true;
@ -36,11 +38,6 @@
};
prettier = {
enable = true;
withArgs = ''
{
extra_args = { "--no-semi", "--single-quote" },
}
'';
};
google_java_format = {
enable = true;
@ -50,7 +47,7 @@
};
black = {
enable = true;
withArgs = ''
settings = ''
{
extra_args = { "--fast" },
}

View File

@ -1,18 +1,20 @@
{
plugins.flash = {
enable = false;
labels = "asdfghjklqwertyuiopzxcvbnm";
search = {
mode = "fuzzy";
};
jump = {
autojump = true;
};
label = {
uppercase = false;
rainbow = {
enabled = false;
shade = 5;
settings = {
labels = "asdfghjklqwertyuiopzxcvbnm";
search = {
mode = "fuzzy";
};
jump = {
autojump = true;
};
label = {
uppercase = false;
rainbow = {
enabled = false;
shade = 5;
};
};
};
};

View File

@ -3,12 +3,13 @@
inputs,
...
}: let
system = pkgs.system;
inherit (pkgs) system;
nixvim = inputs.nixvim.legacyPackages.${system};
icons = import ./config/icons.nix;
nixvimModule = {
inherit pkgs;
pkgs = inputs.unstable.legacyPackages.${system};
module = import ./config;
extraSpecialArgs = {inherit icons;};
};
in (nixvim.makeNixvimWithModule nixvimModule)
in
nixvim.makeNixvimWithModule nixvimModule