Remove nixvim

This commit is contained in:
Paul-Henri Froidmont 2025-11-04 23:26:37 +01:00
parent 185e9edb27
commit bd7de0c0b8
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
3 changed files with 0 additions and 374 deletions

145
flake.lock generated
View file

@ -19,45 +19,6 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -79,34 +40,6 @@
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754860581,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.1.1",
"repo": "ixx",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1759381078,
@ -171,53 +104,6 @@
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_2"
},
"locked": {
"lastModified": 1758373036,
"narHash": "sha256-tm73KNHsGQwAAoFEcAvuXAmHf3KaWLSuf/R9UQ6WMnU=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "a30decbd5fc231e84dfefeb75bc7f57d8167726c",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.05",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1758272005,
"narHash": "sha256-1u3xTH+3kaHhztPmWtLAD8LF5pTYLR2CpsPFWTFnVtQ=",
"owner": "NuschtOS",
"repo": "search",
"rev": "aa975a3757f28ce862812466c5848787b868e116",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"nvim-treesitter": {
"flake": false,
"locked": {
@ -277,41 +163,10 @@
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"nvim-treesitter-main": "nvim-treesitter-main",
"vim-org-roam": "vim-org-roam"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"vim-org-roam": {
"flake": false,
"locked": {

View file

@ -6,10 +6,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay";
nixvim = {
url = "github:nix-community/nixvim/nixos-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
vim-org-roam = {
url = "github:chipsenkbeil/org-roam.nvim";
flake = false;

View file

@ -2,7 +2,6 @@
config,
lib,
pkgs,
inputs,
...
}:
@ -16,7 +15,6 @@ in
config = lib.mkIf cfg.enable {
home-manager.users.${config.user.name} = {
imports = [ inputs.nixvim.homeModules.nixvim ];
programs.neovim = {
enable = true;
@ -271,229 +269,6 @@ in
source = ./lua;
};
programs.nixvim = {
enable = false;
package = pkgs.neovim-unwrapped;
vimAlias = true;
keymaps = [
# Search
{
key = "<leader>cx";
action = "<CMD>Telescope diagnostics layout_strategy=vertical<CR>";
options.desc = "Search diagnostics";
}
# Project
{
key = "<leader>ps";
action = "<CMD>wa<CR>";
options.desc = "Save all buffers";
}
];
plugins = {
lazy = {
enable = true;
plugins = [
{
pkg = pkgs.vimPlugins.gitsigns-nvim;
opts.__raw = # lua
''
{
on_attach = function(buffer)
local gs = package.loaded.gitsigns
local function map(mode, l ,r, desc)
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc})
end
map("n", "<leader>g;", function()
if vim.wo.diff then
vim.cmd.normal({ "]c", bang = true })
else
gs.nav_hunk("next")
end
end, "Next Hunk")
map("n", "<leader>g,", function()
if vim.wo.diff then
vim.cmd.normal({ "[c", bang = true })
else
gs.nav_hunk("prev")
end
end, "Prev Hunk")
map({ "n", "v" }, "<leader>gs", gs.stage_hunk, "Stage Hunk")
map({ "n", "v" }, "<leader>gr", gs.reset_hunk, "Reset Hunk")
map("n", "<leader>gS", gs.stage_buffer, "Stage Buffer")
map("n", "<leader>gu", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "<leader>gR", gs.reset_buffer, "Reset Buffer")
map("n", "<leader>gp", gs.preview_hunk_inline, "Preview Hunk Inline")
map("n", "<leader>gb", function() gs.blame_line({ full = true }) end, "Blame Line")
map("n", "<leader>gd", gs.diffthis, "Diff This")
map("n", "<leader>gD", function() gs.diffthis("~") end, "Diff This ~")
map('n', '<leader>tb', gs.toggle_current_line_blame, "Toggle current line blame")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
end,
}
'';
}
{
pkg = pkgs.vimPlugins.which-key-nvim;
event = "VimEnter";
config = # lua
''
function ()
require('which-key').setup()
require('which-key').register {
['<leader>b'] = { name = 'Buffer', _ = 'which_key_ignore' },
['<leader>c'] = { name = 'Code', _ = 'which_key_ignore' },
['<leader>d'] = { name = 'Document', _ = 'which_key_ignore' },
['<leader>f'] = { name = 'File', _ = 'which_key_ignore' },
['<leader>g'] = { name = 'Git', _ = 'which_key_ignore' },
['<leader>o'] = { name = 'Org', _ = 'which_key_ignore' },
['<leader>n'] = { name = 'Org-roam', _ = 'which_key_ignore' },
['<leader>p'] = { name = 'Project', _ = 'which_key_ignore' },
['<leader>r'] = { name = 'Rename', _ = 'which_key_ignore' },
['<leader>s'] = { name = 'Search', _ = 'which_key_ignore' },
['<leader>w'] = { name = 'Window', _ = 'which_key_ignore' },
['<leader>t'] = { name = 'Toggle', _ = 'which_key_ignore' },
['<leader>q'] = { name = 'Quit/Session', _ = 'which_key_ignore' },
}
end
'';
}
{
pkg = pkgs.vimPlugins.nvim-lspconfig;
config = # lua
''
function ()
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('lsp-attach', { clear = true }),
callback = function(event)
local map = function(keys, func, desc)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end
map('gd', require('telescope.builtin').lsp_definitions, 'Go to definition')
map('gr', require('telescope.builtin').lsp_references, 'Go to references')
map('gI', require('telescope.builtin').lsp_implementations, 'Goto implementation')
map('gD', vim.lsp.buf.declaration, 'Go to declaration')
map('gT', require('telescope.builtin').lsp_type_definitions, 'Type definition')
map('<leader>cD', require('telescope.builtin').lsp_document_symbols, 'Document symbols')
map('<leader>cw', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Workspace symbols ')
map('<leader>cd', vim.diagnostic.open_float, 'Line diagnostics')
map('<leader>c,', vim.diagnostic.goto_prev, 'Previous diagnostics')
map('<leader>c;', vim.diagnostic.goto_next, 'Next diagnostics')
map('<leader>cr', vim.lsp.buf.rename, 'Rename')
map('<leader>ca', vim.lsp.buf.code_action, 'Code action')
map('K', vim.lsp.buf.hover, 'Hover Documentation')
end
})
local has_cmp, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
has_cmp and cmp_nvim_lsp.default_capabilities() or {}
)
local function setup(server, server_opts)
local server_opts_with_caps = vim.tbl_deep_extend("force", {
capabilities = vim.deepcopy(capabilities),
}, server_opts)
require("lspconfig")[server].setup(server_opts_with_caps)
end
setup("yamlls", {})
setup("typos_lsp", {
init_options = { diagnosticSeverity = "Hint" }
})
setup("tsserver", {})
setup("terraformls", {})
setup("marksman", {})
setup("lua_ls", {})
setup("jsonls", { cmd = { "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server", "--stdio" } })
setup("html", { cmd = { "${pkgs.vscode-langservers-extracted}/bin/vscode-html-language-server", "--stdio" } })
setup("eslint", { cmd = { "${pkgs.vscode-langservers-extracted}/bin/vscode-eslint-language-server", "--stdio" } })
setup("dockerls", { cmd = { "${pkgs.dockerfile-language-server-nodejs}/bin/docker-langserver", "--stdio" } })
setup("docker_compose_language_service", {})
setup("cssls", { cmd = { "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server", "--stdio" } })
setup("bashls", {})
setup("ansiblels", { cmd = { "${pkgs.ansible-language-server}/bin/ansible-language-server", "--stdio" } })
end
'';
}
{
pkg = pkgs.vimPlugins.nvim-cmp;
event = "InsertEnter";
dependencies = [
pkgs.vimPlugins.cmp-nvim-lsp
pkgs.vimPlugins.cmp-path
pkgs.vimPlugins.cmp-buffer
];
opts.__raw = # lua
''
function()
local cmp = require("cmp")
return {
mapping = {
["<C-Space>"] = cmp.mapping.complete(),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-e>"] = cmp.mapping.close(),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<S-Tab>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "s" }),
["<Tab>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "s" }),
},
sources = {
{ name = "nvim_lsp" },
{ name = "path" },
{ name = "buffer" },
{ name = "orgmode" },
},
}
end
'';
}
# Disabled for now as it tries to write org grammar to its own directory in the nix store
# https://github.com/nvim-orgmode/orgmode/blob/95fb795a422f0455e03d13a3f83525f1d00793ad/lua/orgmode/utils/treesitter/install.lua#L9
# {
# pkg = pkgs.vimPlugins.orgmode;
# event = "VeryLazy";
# ft = [ "org" ];
# config = /*lua*/ ''
# function ()
# require('orgmode').setup({
# org_agend_files = '~/Nextcloud/Org/**/*',
# org_default_notes_file = '~/Nextcloud/Org/refile.org',
# })
# end
# '';
# }
# {
# pkg = (pkgs.vimUtils.buildVimPlugin {
# name = "org-roam.nvim";
# src = inputs.vim-org-roam;
# });
# dependencies = [ pkgs.vimPlugins.orgmode ];
# event = "VeryLazy";
# ft = [ "org" ];
# config = /*lua*/ ''
# function ()
# require('org-roam').setup({
# directory = '~/Nextcloud/OrgRoam',
# })
# end
# '';
# }
];
};
};
};
home.packages = with pkgs; [
ripgrep
fd