nvim: QoL plugins
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
require("config.options")
|
||||
require("config.keymaps")
|
||||
require("config.lazy")
|
||||
require("vim_options")
|
||||
require("keys")
|
||||
require("plugin")
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
{
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "eb60cc7b94c46005237fd34170d76f3a089a90aa" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"neogit": { "branch": "master", "commit": "6fc2fa890bd2031ed999c074daab0fb4feff20a5" },
|
||||
"nord.nvim": { "branch": "main", "commit": "87394d4fc35c901bbe38326a78d31ab1ead826b6" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a" }
|
||||
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
|
||||
@@ -6,5 +6,3 @@ map("n", "<C-k>", "<C-w>k", { desc = "Move focus up" })
|
||||
map("n", "<C-l>", "<C-w>l", { desc = "Move focus right" })
|
||||
|
||||
map("n", "<Esc>", "<cmd>nohlsearch<CR>", { desc = "Clear search highlight" })
|
||||
|
||||
map("n", "<leader>e", "<cmd>Lexplore<CR>", { desc = "Toggle file explorer" })
|
||||
36
.config/nvim/lua/plugins/git.lua
Normal file
36
.config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sindrets/diffview.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>g",
|
||||
function()
|
||||
require("gitsigns").toggle_current_line_blame(true)
|
||||
require("neogit").open()
|
||||
end,
|
||||
desc = "Open git (Neogit)",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("neogit").setup()
|
||||
vim.api.nvim_create_autocmd("BufUnload", {
|
||||
callback = function(args)
|
||||
if vim.bo[args.buf].filetype == "NeogitStatus" then
|
||||
require("gitsigns").toggle_current_line_blame(false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "BufWinEnter",
|
||||
opts = {
|
||||
current_line_blame = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
27
.config/nvim/lua/plugins/navigation.lua
Normal file
27
.config/nvim/lua/plugins/navigation.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
view_options = { show_hidden = true },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>e", "<cmd>Oil<CR>", desc = "Open file browser" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
picker = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
input = { enabled = true },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>f", function() require("snacks").picker.files() end, desc = "Find files" },
|
||||
{ "<leader>s", function() require("snacks").picker.grep() end, desc = "Search text" },
|
||||
{ "<leader>b", function() require("snacks").picker.buffers() end, desc = "Switch buffer" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
"gbprod/nord.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
transparent = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nord").setup(opts)
|
||||
vim.cmd.colorscheme("nord")
|
||||
end,
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
return {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
ft = { "markdown" },
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
opts = {},
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "master",
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"lua",
|
||||
"bash",
|
||||
"fish",
|
||||
"rust",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"kotlin",
|
||||
"c",
|
||||
"cpp",
|
||||
"html",
|
||||
"css",
|
||||
"python",
|
||||
},
|
||||
auto_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
}
|
||||
55
.config/nvim/lua/plugins/ui.lua
Normal file
55
.config/nvim/lua/plugins/ui.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
{
|
||||
"gbprod/nord.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
transparent = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nord").setup(opts)
|
||||
vim.cmd.colorscheme("nord")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
ft = { "markdown" },
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
lazy = false,
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "master",
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"lua",
|
||||
"bash",
|
||||
"fish",
|
||||
"rust",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"kotlin",
|
||||
"c",
|
||||
"cpp",
|
||||
"html",
|
||||
"css",
|
||||
"python",
|
||||
},
|
||||
auto_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -27,6 +27,3 @@ opt.wrap = false
|
||||
|
||||
opt.scrolloff = 8
|
||||
opt.cursorline = true
|
||||
|
||||
vim.g.netrw_banner = 0
|
||||
vim.g.netrw_liststyle = 3
|
||||
Reference in New Issue
Block a user