Update nvim plugins
This commit is contained in:
parent
81e8786924
commit
1a8c7395ce
|
@ -8,11 +8,11 @@
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-DuhR3y0gPZG0AJ2FDd+nUKzQMwT+c/DFIUWNDQ5Uyx4=",
|
"narHash": "sha256-DuhR3y0gPZG0AJ2FDd+nUKzQMwT+c/DFIUWNDQ5Uyx4=",
|
||||||
"path": "/nix/store/wj2s80jgks6fvyb7b8494qxspr7v7kql-source/home/ags",
|
"path": "/nix/store/1mcbnsa0w6wi9gpmnycj9zdj21gv9yqf-source/home/ags",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/wj2s80jgks6fvyb7b8494qxspr7v7kql-source/home/ags",
|
"path": "/nix/store/1mcbnsa0w6wi9gpmnycj9zdj21gv9yqf-source/home/ags",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -89,7 +89,7 @@ return {
|
||||||
settings = {
|
settings = {
|
||||||
basedpyright = {
|
basedpyright = {
|
||||||
analysis = {
|
analysis = {
|
||||||
typeCheckingMode = "basic",
|
typeCheckingMode = "strict",
|
||||||
autoImportCompletions = true
|
autoImportCompletions = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,15 @@ return {
|
||||||
{'windwp/nvim-autopairs', event = "InsertEnter", opts = {}},
|
{'windwp/nvim-autopairs', event = "InsertEnter", opts = {}},
|
||||||
{'NeogitOrg/neogit', dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "sindrets/diffview.nvim"}, config = true, lazy = true},
|
{'NeogitOrg/neogit', dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "sindrets/diffview.nvim"}, config = true, lazy = true},
|
||||||
{'lervag/vimtex', ft='latex'},
|
{'lervag/vimtex', ft='latex'},
|
||||||
{'numToStr/Comment.nvim', config = function () require('Comment').setup() end},
|
{'numToStr/Comment.nvim',
|
||||||
|
opts = {
|
||||||
|
mappings = {
|
||||||
|
basic = false
|
||||||
|
},
|
||||||
|
toggler = {
|
||||||
|
line = "gcc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, opts = {} }
|
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, opts = {} }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
return {
|
return {
|
||||||
"mfussenegger/nvim-lint",
|
"mfussenegger/nvim-lint",
|
||||||
config = function ()
|
config = function ()
|
||||||
local dmypy = require("lint").linters.dmypy
|
local mypy = require("lint").linters.mypy
|
||||||
dmypy.args = {
|
mypy.args = {
|
||||||
'run',
|
|
||||||
"--timeout",
|
|
||||||
"50000",
|
|
||||||
"--export-types",
|
|
||||||
"--",
|
|
||||||
'--show-column-numbers',
|
'--show-column-numbers',
|
||||||
'--show-error-end',
|
'--show-error-end',
|
||||||
'--hide-error-context',
|
'--hide-error-context',
|
||||||
|
@ -15,7 +10,7 @@ return {
|
||||||
'--no-error-summary',
|
'--no-error-summary',
|
||||||
'--no-pretty',
|
'--no-pretty',
|
||||||
'--cache-dir',
|
'--cache-dir',
|
||||||
vim.fn.stdpath("cache") .. '/dmypy',
|
vim.fn.stdpath("cache") .. '/mypy',
|
||||||
'--cache-fine-grained',
|
'--cache-fine-grained',
|
||||||
'--sqlite-cache',
|
'--sqlite-cache',
|
||||||
'--skip-cache-mtime-checks',
|
'--skip-cache-mtime-checks',
|
||||||
|
@ -25,12 +20,12 @@ return {
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
require("lint").linters_by_ft = {
|
require("lint").linters_by_ft = {
|
||||||
python = {"dmypy"},
|
python = {"mypy"},
|
||||||
}
|
}
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
callback = function()
|
callback = function()
|
||||||
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
||||||
-- for the current filetype
|
-- for the current tile type
|
||||||
require("lint").try_lint()
|
require("lint").try_lint()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,14 +1,83 @@
|
||||||
return {
|
return {
|
||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
config = function()
|
lazy = false,
|
||||||
vim.api.nvim_create_user_command("GitBrowse", function()
|
opts = {
|
||||||
|
gitbrowse = {
|
||||||
|
open = function(url)
|
||||||
|
vim.fn.setreg('+', url) -- Copy to clipboard
|
||||||
|
end
|
||||||
|
},
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
explorer = { enabled = true },
|
||||||
|
indent = {
|
||||||
|
enabled = true,
|
||||||
|
animate = {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
input = { enabled = true },
|
||||||
|
picker = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scope = {
|
||||||
|
enabled = true,
|
||||||
|
keys = {
|
||||||
|
textobject = {
|
||||||
|
ii = {
|
||||||
|
min_size = 2, -- minimum size of the scope
|
||||||
|
edge = false, -- inner scope
|
||||||
|
cursor = false,
|
||||||
|
treesitter = { blocks = { enabled = false } },
|
||||||
|
desc = "inner scope",
|
||||||
|
},
|
||||||
|
ai = {
|
||||||
|
cursor = false,
|
||||||
|
min_size = 2, -- minimum size of the scope
|
||||||
|
treesitter = { blocks = { enabled = false } },
|
||||||
|
desc = "full scope",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
jump = {
|
||||||
|
["gt"] = {
|
||||||
|
min_size = 1, -- allow single line scopes
|
||||||
|
bottom = false,
|
||||||
|
cursor = false,
|
||||||
|
edge = true,
|
||||||
|
treesitter = { blocks = { enabled = false } },
|
||||||
|
desc = "jump to top edge of scope",
|
||||||
|
},
|
||||||
|
["gb"] = {
|
||||||
|
min_size = 1, -- allow single line scopes
|
||||||
|
bottom = true,
|
||||||
|
cursor = false,
|
||||||
|
edge = true,
|
||||||
|
treesitter = { blocks = { enabled = false } },
|
||||||
|
desc = "jump to bottom edge of scope",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
words = { enabled = true },
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
vim.api.nvim_create_user_command("GitLink", function()
|
||||||
require("snacks").gitbrowse()
|
require("snacks").gitbrowse()
|
||||||
end, {})
|
end, {})
|
||||||
vim.api.nvim_create_user_command("GitBlameLine", function()
|
vim.api.nvim_create_user_command("GitBlameLine", function()
|
||||||
require("snacks").gitbrowse()
|
require("snacks").git.blame_line()
|
||||||
end, {})
|
end, {})
|
||||||
|
require("snacks").setup(opts)
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
{"<leader>t", function() require("snacks").explorer() end}
|
{"<leader>t", function() require("snacks").explorer() end},
|
||||||
|
{"<c-m>", function() require("snacks").picker.lsp_symbols({layout = {preset = "right"}, focus="list"}) end},
|
||||||
|
{"<c-s-m>", function() require("snacks").picker.lsp_workspace_symbols({layout = {preset = "vertical"}}) end},
|
||||||
|
{"<c-space>", function() require("snacks").picker.recent({layout = {preset = "vertical"}}) end},
|
||||||
|
{"<c-cr>", function() require("snacks").picker({layout = {preset = "vscode"}}) end},
|
||||||
|
{"<c-p>", function() require("snacks").picker.git_files({layout = {preset = "vscode"}}) end},
|
||||||
|
{"<c-o>", function() require("snacks").picker.buffers({layout = {preset = "vscode"}}) end},
|
||||||
|
{"<c-f>", function() require("snacks").picker.grep({layout = {preset = "vertical"}}) end},
|
||||||
|
{"<c-n>", function() require("snacks").words.jump(1) end},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,98 +0,0 @@
|
||||||
return {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-telescope/telescope-fzy-native.nvim',
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
file_ignore_patterns = {
|
|
||||||
".cache/.*",
|
|
||||||
"node_modules/.*",
|
|
||||||
".git/.*",
|
|
||||||
"Venv/.*",
|
|
||||||
"venv/.*",
|
|
||||||
"wandb/.*",
|
|
||||||
"Resources/.*",
|
|
||||||
"build/.*"
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["jj"] = require("telescope.actions").close,
|
|
||||||
["<C-j>"] = require("telescope.actions").move_selection_next,
|
|
||||||
["<C-k>"] = require("telescope.actions").move_selection_previous,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
file_sorter = require'telescope.sorters'.get_fzy_sorter,
|
|
||||||
generic_sorter = require'telescope.sorters'.get_fzy_sorter,
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
undo = {
|
|
||||||
side_by_side = false,
|
|
||||||
layout_strategy = "vertical",
|
|
||||||
use_delta = true,
|
|
||||||
layout_config = {
|
|
||||||
preview_height = 0.5,
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<cr>"] = require("telescope-undo.actions").restore,
|
|
||||||
["<S-y>"] = require("telescope-undo.actions").yank_additions,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fzy_native = {
|
|
||||||
override_generic_sorter = false,
|
|
||||||
override_file_sorter = true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>u", require("telescope").extensions.undo.undo},
|
|
||||||
{ "<C-Space>", function ()
|
|
||||||
local opts = require('telescope.themes').get_ivy({})
|
|
||||||
opts["layout_config"] = {height=0.2}
|
|
||||||
require("telescope.builtin").oldfiles(opts)
|
|
||||||
end},
|
|
||||||
{ "<C-f>", function () require"telescope.builtin".live_grep({ path_display = { 'smart' }, }) end},
|
|
||||||
{ "<C-p>", function () -- git files
|
|
||||||
local opts = require('telescope.themes').get_ivy({})
|
|
||||||
opts["show_untracked"] = true
|
|
||||||
opts["layout_config"] = {height=0.2}
|
|
||||||
if not pcall(require"telescope.builtin".git_files, opts) then
|
|
||||||
require"telescope.builtin".find_files(opts)
|
|
||||||
end
|
|
||||||
end},
|
|
||||||
{ "<C-S-o>", function () -- project files
|
|
||||||
local opts = require('telescope.themes').get_ivy({})
|
|
||||||
opts["layout_config"] = {height=0.2}
|
|
||||||
require"telescope.builtin".find_files(opts)
|
|
||||||
end},
|
|
||||||
{ "<C-o>", function () -- buffer files
|
|
||||||
local opts = require('telescope.themes').get_ivy({})
|
|
||||||
opts["layout_config"] = {height=0.2}
|
|
||||||
require"telescope.builtin".buffers(opts)
|
|
||||||
end},
|
|
||||||
{ "<C-m>", function () -- methods / classes
|
|
||||||
local opts = require('telescope.themes').get_ivy({})
|
|
||||||
opts["layout_config"] = {height=0.2}
|
|
||||||
opts["symbols"] = { "class", "method", "function" }
|
|
||||||
require("telescope.builtin").lsp_document_symbols(opts)
|
|
||||||
end},
|
|
||||||
{ "<C-S-f>", function () -- fuzzy search
|
|
||||||
require"telescope.builtin".grep_string({
|
|
||||||
path_display = { 'smart' },
|
|
||||||
only_sort_text = true,
|
|
||||||
word_match = "-w",
|
|
||||||
search = '',
|
|
||||||
})
|
|
||||||
end},
|
|
||||||
},
|
|
||||||
config = function (_, opts)
|
|
||||||
local telescope = require("telescope")
|
|
||||||
telescope.setup(opts)
|
|
||||||
telescope.load_extension("undo")
|
|
||||||
telescope.load_extension('fzy_native')
|
|
||||||
end
|
|
||||||
}
|
|
|
@ -1,10 +1,7 @@
|
||||||
{ inputs, config, pkgs, ... }:
|
{ inputs, config, pkgs, ... }:
|
||||||
let
|
{
|
||||||
serverIP = "192.168.1.2";
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
(import ../Common/default.nix { inherit inputs config pkgs; })
|
(import ../Common/default.nix { inherit inputs config pkgs; })
|
||||||
(import ../Common/nfs.nix { inherit pkgs serverIP; })
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
@ -25,4 +22,16 @@ in {
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
fileSystems."/home/server/Workspace" = {
|
||||||
|
device = "/home/server/Workspace";
|
||||||
|
fsType = "virtiofs";
|
||||||
|
};
|
||||||
|
fileSystems."/home/server/.cache/fzgo" = {
|
||||||
|
device = "/home/server/.cache/fzgo";
|
||||||
|
fsType = "virtiofs";
|
||||||
|
};
|
||||||
|
fileSystems."/home/user/Workspace" = {
|
||||||
|
device = "/home/server/Workspace";
|
||||||
|
options = ["bind"];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue