added devicons, neogen, todo-comments and trouble
This commit is contained in:
@@ -7,7 +7,7 @@ harpoon:setup()
|
|||||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
||||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end)
|
||||||
-- vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
|
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end)
|
||||||
-- vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
|
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end)
|
||||||
-- vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
|
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ cmp.setup({
|
|||||||
entries = 'native',
|
entries = 'native',
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = 'menu,menuone,noinsert',
|
completeopt = 'menuone,noselect,preview',
|
||||||
docs_initially_visible = true
|
docs_initially_visible = true
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
|
|||||||
33
after/plugin/neogen.lua
Normal file
33
after/plugin/neogen.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
local neogen = require('neogen')
|
||||||
|
|
||||||
|
neogen.setup({
|
||||||
|
enabled = true, --if you want to disable Neogen
|
||||||
|
input_after_comment = true, -- (default: true) automatic jump (with insert mode) on inserted annotation
|
||||||
|
languages = {
|
||||||
|
cs = {
|
||||||
|
template = {
|
||||||
|
annotation_convention = 'xmldoc'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>nf', function()
|
||||||
|
neogen.generate({ type = 'func' })
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>nt', function()
|
||||||
|
neogen.generate({ type = 'type' })
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>nc', function()
|
||||||
|
neogen.generate({ type = 'class' })
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('i', '<C-k>', function()
|
||||||
|
neogen.jump_next()
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set('i', '<C-j>', function()
|
||||||
|
neogen.jump_prev()
|
||||||
|
end)
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||||
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>pt', ':TodoTelescope<CR>')
|
||||||
vim.keymap.set("n", "<leader>ps", function()
|
vim.keymap.set("n", "<leader>ps", function()
|
||||||
local status, result = pcall(function() return vim.fn.input("Grep > ") end)
|
local status, result = pcall(function() return vim.fn.input("Grep > ") end)
|
||||||
--
|
--
|
||||||
@@ -11,4 +12,5 @@ vim.keymap.set("n", "<leader>ps", function()
|
|||||||
|
|
||||||
builtin.grep_string({ search = result });
|
builtin.grep_string({ search = result });
|
||||||
end)
|
end)
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" })
|
vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" })
|
||||||
|
|||||||
2
after/plugin/todo.lua
Normal file
2
after/plugin/todo.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
local todo = require('todo-comments')
|
||||||
|
todo.setup()
|
||||||
6
after/plugin/trouble.lua
Normal file
6
after/plugin/trouble.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
local trouble = require('trouble')
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>tt', ':TodoTrouble<CR>')
|
||||||
|
vim.keymap.set('n', '<leader>tv', function ()
|
||||||
|
trouble.open()
|
||||||
|
end)
|
||||||
@@ -55,4 +55,21 @@ return require('packer').startup(function(use)
|
|||||||
use('hrsh7th/cmp-path')
|
use('hrsh7th/cmp-path')
|
||||||
use('hrsh7th/cmp-cmdline')
|
use('hrsh7th/cmp-cmdline')
|
||||||
use('L3MON4D3/LuaSnip')
|
use('L3MON4D3/LuaSnip')
|
||||||
|
|
||||||
|
use('nvim-tree/nvim-web-devicons')
|
||||||
|
|
||||||
|
use {
|
||||||
|
'danymat/neogen',
|
||||||
|
requires = { 'nvim-treesitter/nvim-treesitter' }
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'folke/todo-comments.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary' }
|
||||||
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||||
|
}
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -139,6 +139,11 @@ _G.packer_plugins = {
|
|||||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
||||||
url = "https://github.com/williamboman/mason.nvim"
|
url = "https://github.com/williamboman/mason.nvim"
|
||||||
},
|
},
|
||||||
|
neogen = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/neogen",
|
||||||
|
url = "https://github.com/danymat/neogen"
|
||||||
|
},
|
||||||
["nvim-cmp"] = {
|
["nvim-cmp"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
@@ -160,9 +165,8 @@ _G.packer_plugins = {
|
|||||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
["nvim-web-devicons"] = {
|
["nvim-web-devicons"] = {
|
||||||
loaded = false,
|
loaded = true,
|
||||||
needs_bufread = false,
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
path = "/home/j409/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
|
|
||||||
url = "https://github.com/nvim-tree/nvim-web-devicons"
|
url = "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
["packer.nvim"] = {
|
["packer.nvim"] = {
|
||||||
@@ -180,6 +184,16 @@ _G.packer_plugins = {
|
|||||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
|
["todo-comments.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
|
||||||
|
url = "https://github.com/folke/todo-comments.nvim"
|
||||||
|
},
|
||||||
|
["trouble.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/trouble.nvim",
|
||||||
|
url = "https://github.com/folke/trouble.nvim"
|
||||||
|
},
|
||||||
undotree = {
|
undotree = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/j409/.local/share/nvim/site/pack/packer/start/undotree",
|
path = "/home/j409/.local/share/nvim/site/pack/packer/start/undotree",
|
||||||
|
|||||||
Reference in New Issue
Block a user