mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-15 17:53:32 +00:00
chore(nvim): more tweaks, cleanup and docs
This commit is contained in:
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"neodev": {
|
|
||||||
"library": {
|
|
||||||
"enabled": true,
|
|
||||||
"plugins": [
|
|
||||||
"nvim-lspconfig",
|
|
||||||
"lsp",
|
|
||||||
"completion"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neoconf": {
|
|
||||||
"plugins": {
|
|
||||||
"lua_ls": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lspconfig": {
|
|
||||||
"lua_ls": {
|
|
||||||
"Lua.completion.callSnippet": "Replace"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -36,7 +36,7 @@ require('lazy').setup(
|
|||||||
-- Automatically check for updates
|
-- Automatically check for updates
|
||||||
enabled = true,
|
enabled = true,
|
||||||
-- We don't want to be notified about updates
|
-- We don't want to be notified about updates
|
||||||
nofity = false,
|
notify = false,
|
||||||
},
|
},
|
||||||
change_detection = {
|
change_detection = {
|
||||||
-- No need to notify about changes
|
-- No need to notify about changes
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
-- For more options, you can see `:help option-list`
|
-- For more options, you can see `:help option-list`
|
||||||
|
|
||||||
|
-- Enables the experimental nvim 0.5 features
|
||||||
|
vim.loader.enable()
|
||||||
|
|
||||||
|
-- Map leader and local leader
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
@@ -73,12 +77,6 @@ vim.opt.cursorline = true
|
|||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
vim.opt.scrolloff = 15
|
vim.opt.scrolloff = 15
|
||||||
|
|
||||||
-- Enable break indent
|
|
||||||
vim.o.breakindent = true
|
|
||||||
|
|
||||||
-- Save undo history
|
|
||||||
vim.o.undofile = true
|
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
vim.o.completeopt = 'menuone,noselect'
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
@@ -93,6 +91,13 @@ vim.o.spelllang = 'en_us'
|
|||||||
vim.g.loaded_perl_provider = 0
|
vim.g.loaded_perl_provider = 0
|
||||||
vim.g.loaded_ruby_provider = 0
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
|
||||||
|
-- kevinhwang91/nvim-ufo settings
|
||||||
|
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||||
|
vim.o.foldcolumn = '1' -- '0' is not bad
|
||||||
|
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||||
|
vim.o.foldlevelstart = 99
|
||||||
|
vim.o.foldenable = true
|
||||||
|
|
||||||
-- anuvyklack/windows.nvim settings
|
-- anuvyklack/windows.nvim settings
|
||||||
vim.o.winwidth = 15
|
vim.o.winwidth = 15
|
||||||
vim.o.winminwidth = 10
|
vim.o.winminwidth = 10
|
||||||
|
|||||||
@@ -7,11 +7,9 @@ return {
|
|||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
'<leader>cf',
|
'<leader>cf',
|
||||||
function()
|
'<cmd>lua require("conform").format({ async = true, lsp_fallback = true })<cr>',
|
||||||
require('conform').format { async = true, lsp_fallback = true }
|
|
||||||
end,
|
|
||||||
mode = '',
|
mode = '',
|
||||||
desc = '[f] Format buffer',
|
desc = 'Format buffer',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
-- Auto completion
|
||||||
|
-- https://github.com/hrsh7th/nvim-cmp
|
||||||
return {
|
return {
|
||||||
-- Auto completion
|
|
||||||
-- https://github.com/hrsh7th/nvim-cmp
|
|
||||||
{
|
{
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
@@ -63,7 +63,7 @@ return {
|
|||||||
require('copilot_cmp').setup()
|
require('copilot_cmp').setup()
|
||||||
|
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
if vim.api.nvim_buf_get_option(0, 'buftype') == 'prompt' then
|
if vim.api.nvim_get_option_value('buftype', {}) == 'prompt' then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
@@ -142,7 +142,7 @@ return {
|
|||||||
comparators = {
|
comparators = {
|
||||||
require('copilot_cmp.comparators').prioritize,
|
require('copilot_cmp.comparators').prioritize,
|
||||||
|
|
||||||
-- Below is the default comparitor list and order for nvim-cmp
|
-- Below is the default comparator list and order for nvim-cmp
|
||||||
cmp.config.compare.offset,
|
cmp.config.compare.offset,
|
||||||
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
|
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
|
||||||
cmp.config.compare.exact,
|
cmp.config.compare.exact,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
-- A small Neovim plugin for previewing definitions using floating windows.
|
||||||
|
-- https://github.com/rmagatti/goto-preview
|
||||||
return {
|
return {
|
||||||
-- A small Neovim plugin for previewing definitions using floating windows.
|
|
||||||
-- https://github.com/rmagatti/goto-preview
|
|
||||||
'rmagatti/goto-preview',
|
'rmagatti/goto-preview',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ 'nvim-telescope/telescope.nvim' },
|
{ 'nvim-telescope/telescope.nvim' },
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
return {
|
|
||||||
-- Getting you where you want with the fewest keystrokes.
|
|
||||||
-- https://github.com/ThePrimeagen/harpoon
|
|
||||||
{
|
|
||||||
'ThePrimeagen/harpoon',
|
|
||||||
branch = 'harpoon2',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local harpoon = require 'harpoon'
|
|
||||||
harpoon:setup {}
|
|
||||||
|
|
||||||
-- basic telescope configuration
|
|
||||||
local conf = require('telescope.config').values
|
|
||||||
local function toggle_telescope(harpoon_files)
|
|
||||||
local file_paths = {}
|
|
||||||
for _, item in ipairs(harpoon_files.items) do
|
|
||||||
table.insert(file_paths, item.value)
|
|
||||||
end
|
|
||||||
|
|
||||||
require('telescope.pickers')
|
|
||||||
.new({}, {
|
|
||||||
prompt_title = 'Harpoon',
|
|
||||||
finder = require('telescope.finders').new_table {
|
|
||||||
results = file_paths,
|
|
||||||
},
|
|
||||||
previewer = conf.file_previewer {},
|
|
||||||
sorter = conf.generic_sorter {},
|
|
||||||
})
|
|
||||||
:find()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>hw', function()
|
|
||||||
toggle_telescope(harpoon:list())
|
|
||||||
end, { desc = 'Open harpoon window with telescope' })
|
|
||||||
vim.keymap.set('n', '<leader>ht', function()
|
|
||||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
|
||||||
end, { desc = 'Open Harpoon Quick menu' })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,89 +1,30 @@
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
-- A better annotation generator.
|
-- A better annotation generator.
|
||||||
-- Supports multiple languages and annotation conventions.
|
-- Supports multiple languages and annotation conventions.
|
||||||
-- https://github.com/danymat/neogen
|
-- https://github.com/danymat/neogen
|
||||||
{
|
{ 'danymat/neogen', version = '*', opts = { enabled = true, snippet_engine = 'luasnip' } },
|
||||||
'danymat/neogen',
|
|
||||||
version = '*',
|
|
||||||
opts = {
|
|
||||||
enabled = true,
|
|
||||||
snippet_engine = 'luasnip',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- The Refactoring library based off the Refactoring book by Martin Fowler
|
-- The Refactoring library based off the Refactoring book by Martin Fowler
|
||||||
-- https://github.com/ThePrimeagen/refactoring.nvim
|
-- https://github.com/ThePrimeagen/refactoring.nvim
|
||||||
{
|
{ 'ThePrimeagen/refactoring.nvim', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter' }, opts = {} },
|
||||||
'ThePrimeagen/refactoring.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('refactoring').setup()
|
|
||||||
|
|
||||||
local r = require 'refactoring'
|
|
||||||
|
|
||||||
vim.keymap.set('x', '<leader>re', function()
|
|
||||||
r.refactor 'Extract Function'
|
|
||||||
end)
|
|
||||||
vim.keymap.set('x', '<leader>rf', function()
|
|
||||||
r.refactor 'Extract Function To File'
|
|
||||||
end)
|
|
||||||
-- Extract function supports only visual mode
|
|
||||||
vim.keymap.set('x', '<leader>rv', function()
|
|
||||||
r.refactor 'Extract Variable'
|
|
||||||
end)
|
|
||||||
-- Extract variable supports only visual mode
|
|
||||||
vim.keymap.set('n', '<leader>rI', function()
|
|
||||||
r.refactor 'Inline Function'
|
|
||||||
end)
|
|
||||||
-- Inline func supports only normal
|
|
||||||
vim.keymap.set({ 'n', 'x' }, '<leader>ri', function()
|
|
||||||
r.refactor 'Inline Variable'
|
|
||||||
end)
|
|
||||||
-- Inline var supports both normal and visual mode
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>rb', function()
|
|
||||||
r.refactor 'Extract Block'
|
|
||||||
end)
|
|
||||||
vim.keymap.set('n', '<leader>rbf', function()
|
|
||||||
r.refactor 'Extract Block To File'
|
|
||||||
end)
|
|
||||||
-- Extract block supports only normal mode
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- All the npm/yarn/pnpm commands I don't want to type
|
-- All the npm/yarn/pnpm commands I don't want to type
|
||||||
-- https://github.com/vuki656/package-info.nvim
|
-- https://github.com/vuki656/package-info.nvim
|
||||||
{
|
{ 'vuki656/package-info.nvim', dependencies = { 'MunifTanjim/nui.nvim' } },
|
||||||
'vuki656/package-info.nvim',
|
|
||||||
dependencies = { 'MunifTanjim/nui.nvim' },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Add/change/delete surrounding delimiter pairs with ease. Written with ❤️ in Lua.
|
-- Add/change/delete surrounding delimiter pairs with ease. Written with ❤️ in Lua.
|
||||||
-- https://github.com/kylechui/nvim-surround
|
-- https://github.com/kylechui/nvim-surround
|
||||||
{
|
{ 'kylechui/nvim-surround', version = '*', event = 'VeryLazy' },
|
||||||
'kylechui/nvim-surround',
|
|
||||||
version = '*', -- Use for stability; omit to use `main` branch for the latest features
|
|
||||||
event = 'VeryLazy',
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Highlight, list and search todo comments in your projects
|
-- Highlight, list and search todo comments in your projects
|
||||||
-- https://github.com/folke/todo-comments.nvim
|
-- https://github.com/folke/todo-comments.nvim
|
||||||
{
|
{ 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, opts = {} },
|
||||||
'folke/todo-comments.nvim',
|
|
||||||
dependencies = 'nvim-lua/plenary.nvim',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Commenting
|
-- Commenting
|
||||||
|
-- "gc" to comment visual regions/lines
|
||||||
-- https://github.com/numToStr/Comment.nvim
|
-- https://github.com/numToStr/Comment.nvim
|
||||||
{
|
{ 'numToStr/Comment.nvim', event = { 'BufRead', 'BufNewFile' }, opts = {} },
|
||||||
'numToStr/Comment.nvim', -- "gc" to comment visual regions/lines
|
|
||||||
event = { 'BufRead', 'BufNewFile' },
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Detect tabstop and shiftwidth automatically
|
-- Detect tabstop and shiftwidth automatically
|
||||||
-- https://github.com/tpope/vim-sleuth
|
-- https://github.com/tpope/vim-sleuth
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ return {
|
|||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Neovim plugin to manage global and project-local settings
|
|
||||||
-- Should be included before LSP Config
|
|
||||||
-- https://github.com/folke/neoconf.nvim
|
|
||||||
{ 'folke/neoconf.nvim', opts = {} },
|
|
||||||
|
|
||||||
-- Garbage collector that stops inactive LSP clients to free RAM
|
-- Garbage collector that stops inactive LSP clients to free RAM
|
||||||
-- https://github.com/Zeioth/garbage-day.nvim
|
-- https://github.com/Zeioth/garbage-day.nvim
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,12 +27,10 @@ return {
|
|||||||
{
|
{
|
||||||
require('noice').api.statusline.mode.get,
|
require('noice').api.statusline.mode.get,
|
||||||
cond = require('noice').api.statusline.mode.has,
|
cond = require('noice').api.statusline.mode.has,
|
||||||
-- color = { fg = '#ff9e64' },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
require('noice').api.status.command.get,
|
require('noice').api.status.command.get,
|
||||||
cond = require('noice').api.status.command.has,
|
cond = require('noice').api.status.command.has,
|
||||||
-- color = { fg = '#ff9e64' },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ return {
|
|||||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||||
'MunifTanjim/nui.nvim',
|
'MunifTanjim/nui.nvim',
|
||||||
{
|
{
|
||||||
|
-- This plugins prompts the user to pick a window and returns
|
||||||
|
-- the window id of the picked window
|
||||||
|
-- https://github.com/s1n7ax/nvim-window-picker
|
||||||
's1n7ax/nvim-window-picker',
|
's1n7ax/nvim-window-picker',
|
||||||
version = '2.*',
|
version = '2.*',
|
||||||
opts = {
|
opts = {
|
||||||
|
|||||||
@@ -8,7 +8,51 @@ return {
|
|||||||
{ 'nvim-lua/plenary.nvim' },
|
{ 'nvim-lua/plenary.nvim' },
|
||||||
{ 'nvim-telescope/telescope-symbols.nvim' },
|
{ 'nvim-telescope/telescope-symbols.nvim' },
|
||||||
{ 'folke/which-key.nvim' },
|
{ 'folke/which-key.nvim' },
|
||||||
{ 'ThePrimeagen/harpoon' },
|
-- Getting you where you want with the fewest keystrokes.
|
||||||
|
-- https://github.com/ThePrimeagen/harpoon
|
||||||
|
{
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
branch = 'harpoon2',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local harpoon = require 'harpoon'
|
||||||
|
harpoon:setup {}
|
||||||
|
|
||||||
|
-- basic telescope configuration
|
||||||
|
local conf = require('telescope.config').values
|
||||||
|
local function toggle_telescope(harpoon_files)
|
||||||
|
local file_paths = {}
|
||||||
|
for _, item in ipairs(harpoon_files.items) do
|
||||||
|
table.insert(file_paths, item.value)
|
||||||
|
end
|
||||||
|
|
||||||
|
require('telescope.pickers')
|
||||||
|
.new({}, {
|
||||||
|
prompt_title = 'Harpoon',
|
||||||
|
finder = require('telescope.finders').new_table {
|
||||||
|
results = file_paths,
|
||||||
|
},
|
||||||
|
previewer = conf.file_previewer {},
|
||||||
|
sorter = conf.generic_sorter {},
|
||||||
|
})
|
||||||
|
:find()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>hw', function()
|
||||||
|
toggle_telescope(harpoon:list())
|
||||||
|
end, { desc = 'Open harpoon window with telescope' })
|
||||||
|
vim.keymap.set('n', '<leader>ht', function()
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end, { desc = 'Open Harpoon Quick menu' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- A Telescope picker to quickly access configurations
|
||||||
|
-- of plugins managed by lazy.nvim.
|
||||||
|
-- https://github.com/polirritmico/telescope-lazy-plugins.nvim
|
||||||
|
{ 'polirritmico/telescope-lazy-plugins.nvim' },
|
||||||
|
|
||||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||||
-- Only load if `make` is available
|
-- Only load if `make` is available
|
||||||
@@ -47,16 +91,17 @@ return {
|
|||||||
-- Load extensions
|
-- Load extensions
|
||||||
pcall(t.load_extension, 'harpoon')
|
pcall(t.load_extension, 'harpoon')
|
||||||
pcall(t.load_extension, 'git_worktree')
|
pcall(t.load_extension, 'git_worktree')
|
||||||
|
pcall(t.load_extension, 'lazy_plugins')
|
||||||
|
|
||||||
-- Enable telescope fzf native, if installed
|
-- Enable telescope fzf native, if installed
|
||||||
pcall(t.load_extension, 'fzf')
|
pcall(t.load_extension, 'fzf')
|
||||||
|
|
||||||
-- [[ Telescope Keymaps ]]
|
-- [[ Telescope Keymaps ]]
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
-- See `:help telescope.keymap`
|
-- See `:help telescope.keymap`
|
||||||
local b = require 'telescope.builtin'
|
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||||
b.current_buffer_fuzzy_find(themes.get_dropdown {
|
require('telescope.builtin').current_buffer_fuzzy_find(themes.get_dropdown {
|
||||||
winblend = 10,
|
winblend = 10,
|
||||||
previewer = true,
|
previewer = true,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,13 +15,6 @@ return {
|
|||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
init = function()
|
|
||||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
|
||||||
vim.o.foldcolumn = '1' -- '0' is not bad
|
|
||||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
|
||||||
vim.o.foldlevelstart = 99
|
|
||||||
vim.o.foldenable = true
|
|
||||||
end,
|
|
||||||
opts = {
|
opts = {
|
||||||
open_fold_hl_timeout = 150,
|
open_fold_hl_timeout = 150,
|
||||||
close_fold_kinds_for_ft = { 'imports', 'comment' },
|
close_fold_kinds_for_ft = { 'imports', 'comment' },
|
||||||
|
|||||||
@@ -168,4 +168,13 @@ return {
|
|||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Plugin to improve viewing Markdown files in Neovim
|
||||||
|
-- https://github.com/MeanderingProgrammer/render-markdown.nvim
|
||||||
|
{
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' },
|
||||||
|
ft = 'markdown',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ return {
|
|||||||
-- ── Code ────────────────────────────────────────────────────────────
|
-- ── Code ────────────────────────────────────────────────────────────
|
||||||
{ '<leader>c', group = '[c] Code' },
|
{ '<leader>c', group = '[c] Code' },
|
||||||
{ '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', desc = 'LSP: Code Action' },
|
{ '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', desc = 'LSP: Code Action' },
|
||||||
{ '<leader>cr', '<cmd>lua vim.lsp.buf.rename()<CR>', desc = 'LSP: Rename' },
|
|
||||||
{ '<leader>cg', '<cmd>lua require("neogen").generate()<CR>', desc = 'Generate annotations' },
|
{ '<leader>cg', '<cmd>lua require("neogen").generate()<CR>', desc = 'Generate annotations' },
|
||||||
|
|
||||||
-- ── Code: CommentBox ────────────────────────────────────────────────
|
-- ── Code: CommentBox ────────────────────────────────────────────────
|
||||||
{ '<leader>cb', group = 'CommentBox' },
|
{ '<leader>cb', group = 'CommentBox' },
|
||||||
{ '<leader>cbb', '<Cmd>CBccbox<CR>', desc = 'CommentBox: Box Title' },
|
{ '<leader>cbb', '<Cmd>CBccbox<CR>', desc = 'CommentBox: Box Title' },
|
||||||
@@ -47,21 +45,41 @@ return {
|
|||||||
{ '<leader>cbl', '<Cmd>CBline<CR>', desc = 'CommentBox: Simple Line' },
|
{ '<leader>cbl', '<Cmd>CBline<CR>', desc = 'CommentBox: Simple Line' },
|
||||||
{ '<leader>cbm', '<Cmd>CBllbox14<CR>', desc = 'CommentBox: Marked' },
|
{ '<leader>cbm', '<Cmd>CBllbox14<CR>', desc = 'CommentBox: Marked' },
|
||||||
{ '<leader>cbt', '<Cmd>CBllline<CR>', desc = 'CommentBox: Titled Line' },
|
{ '<leader>cbt', '<Cmd>CBllline<CR>', desc = 'CommentBox: Titled Line' },
|
||||||
-- Code: package.json control
|
-- ── Code: package.json control ──────────────────────────────────────
|
||||||
-- See: lua/plugins/lazy.lua
|
-- See: lua/plugins/lazy.lua
|
||||||
{ '<leader>cn', group = 'package.json control' },
|
{ '<leader>cn', group = 'package.json control' },
|
||||||
{ '<leader>cnd', '<cmd>lua require("package-info").delete()<cr>', desc = 'Delete package' },
|
{ '<leader>cnd', '<cmd>lua require("package-info").delete()<cr>', desc = 'Delete package' },
|
||||||
{ '<leader>cni', '<cmd>lua require("package-info").install()<cr>', desc = 'Install package' },
|
{ '<leader>cni', '<cmd>lua require("package-info").install()<cr>', desc = 'Install package' },
|
||||||
{ '<leader>cns', '<cmd>lua require("package-info").show({ force = true })<cr>', desc = 'Show package info' },
|
{ '<leader>cns', '<cmd>lua require("package-info").show({ force = true })<cr>', desc = 'Show package info' },
|
||||||
{ '<leader>cnu', '<cmd>lua require("package-info").change_version()<cr>', desc = 'Change version' },
|
{ '<leader>cnu', '<cmd>lua require("package-info").change_version()<cr>', desc = 'Change version' },
|
||||||
-- Code: LSPSaga
|
-- ── Code: Refactoring ───────────────────────────────────────────────
|
||||||
|
{ '<leader>cx', group = '[x] Refactoring' },
|
||||||
|
{
|
||||||
|
mode = { 'x' },
|
||||||
|
-- Extract function supports only visual mode
|
||||||
|
{ '<leader>cxe', "<cmd>lua require('refactoring').refactor('Extract Function')<cr>", desc = 'Extract Function' },
|
||||||
|
{ '<leader>cxf', "<cmd>lua require('refactoring').refactor('Extract Function To File')<cr>", desc = 'Extract Function to File' },
|
||||||
|
-- Extract variable supports only visual mode
|
||||||
|
{ '<leader>cxv', "<cmd>lua require('refactoring').refactor('Extract Variable')<cr>", desc = 'Extract Variable' },
|
||||||
|
},
|
||||||
|
-- Inline func supports only normal
|
||||||
|
{ '<leader>cxi', "<cmd>lua require('refactoring').refactor('Inline Function')<cr>", desc = 'Inline Function' },
|
||||||
|
-- Extract block supports only normal mode
|
||||||
|
{ '<leader>cxb', "<cmd>lua require('refactoring').refactor('Extract Block')<cr>", desc = 'Extract Block' },
|
||||||
|
{ '<leader>cxbf', "<cmd>lua require('refactoring').refactor('Extract Block To File')<cr>", desc = 'Extract Block to File' },
|
||||||
|
{
|
||||||
|
mode = { 'n', 'x' },
|
||||||
|
-- Inline var supports both normal and visual mode
|
||||||
|
{ '<leader>cxi', "<cmd>lua require('refactoring').refactor('Inline Variable')<cr>", desc = 'Inline Variable' },
|
||||||
|
},
|
||||||
|
-- ── Code: LSPSaga ───────────────────────────────────────────────────
|
||||||
-- See: lua/plugins/lsp.lua
|
-- See: lua/plugins/lsp.lua
|
||||||
{ '<C-a>', '<cmd>Lspsaga term_toggle<cr>', desc = 'LSPSaga: Open Floaterm' },
|
{ '<C-a>', '<cmd>Lspsaga term_toggle<cr>', desc = 'LSPSaga: Open Floaterm' },
|
||||||
{ '<leader>ca', '<cmd>Lspsaga code_action<cr>', desc = 'LSPSaga: Code Actions' },
|
{ '<leader>ca', '<cmd>Lspsaga code_action<cr>', desc = 'LSPSaga: Code Actions' },
|
||||||
{ '<leader>cci', '<cmd>Lspsaga incoming_calls<cr>', desc = 'LSPSaga: Incoming Calls' },
|
{ '<leader>cci', '<cmd>Lspsaga incoming_calls<cr>', desc = 'LSPSaga: Incoming Calls' },
|
||||||
{ '<leader>cco', '<cmd>Lspsaga outgoing_calls<cr>', desc = 'LSPSaga: Outgoing Calls' },
|
{ '<leader>cco', '<cmd>Lspsaga outgoing_calls<cr>', desc = 'LSPSaga: Outgoing Calls' },
|
||||||
{ '<leader>cd', '<cmd>Lspsaga show_line_diagnostics<cr>', desc = 'LSPSaga: Show Line Diagnostics' },
|
{ '<leader>cd', '<cmd>Lspsaga show_line_diagnostics<cr>', desc = 'LSPSaga: Show Line Diagnostics' },
|
||||||
{ '<leader>cf', '<cmd>Lspsaga lsp_finder<cr>', desc = 'LSPSaga: LSP Finder' },
|
-- <leader>cf = Code Format, see: lua/plugins/autoformat.lua
|
||||||
{ '<leader>ci', '<cmd>Lspsaga implement<cr>', desc = 'LSPSaga: Implementations' },
|
{ '<leader>ci', '<cmd>Lspsaga implement<cr>', desc = 'LSPSaga: Implementations' },
|
||||||
{ '<leader>cl', '<cmd>Lspsaga show_cursor_diagnostics<cr>', desc = 'LSPSaga: Show Cursor Diagnostics' },
|
{ '<leader>cl', '<cmd>Lspsaga show_cursor_diagnostics<cr>', desc = 'LSPSaga: Show Cursor Diagnostics' },
|
||||||
{ '<leader>cp', '<cmd>Lspsaga peek_definition<cr>', desc = 'LSPSaga: Peek Definition' },
|
{ '<leader>cp', '<cmd>Lspsaga peek_definition<cr>', desc = 'LSPSaga: Peek Definition' },
|
||||||
@@ -84,8 +102,8 @@ return {
|
|||||||
{ '<leader>dt', '<cmd>DapUiToggle', desc = 'DAP: Toggle UI' },
|
{ '<leader>dt', '<cmd>DapUiToggle', desc = 'DAP: Toggle UI' },
|
||||||
|
|
||||||
-- ── Harpoon ─────────────────────────────────────────────────────────
|
-- ── Harpoon ─────────────────────────────────────────────────────────
|
||||||
|
-- See: lua/plugins/telescope.lua
|
||||||
{ '<leader>h', group = '[h] Harpoon' },
|
{ '<leader>h', group = '[h] Harpoon' },
|
||||||
-- See: lua/plugins/harpoon.lua
|
|
||||||
{ '<leader>ha', '<cmd>lua require("harpoon"):list():add()<cr>', desc = 'harpoon file' },
|
{ '<leader>ha', '<cmd>lua require("harpoon"):list():add()<cr>', desc = 'harpoon file' },
|
||||||
{ '<leader>hn', '<cmd>lua require("harpoon"):list():next()<cr>', desc = 'harpoon to next file' },
|
{ '<leader>hn', '<cmd>lua require("harpoon"):list():next()<cr>', desc = 'harpoon to next file' },
|
||||||
{ '<leader>hp', '<cmd>lua require("harpoon"):list():prev()<cr>', desc = 'harpoon to previous file' },
|
{ '<leader>hp', '<cmd>lua require("harpoon"):list():prev()<cr>', desc = 'harpoon to previous file' },
|
||||||
@@ -106,13 +124,12 @@ return {
|
|||||||
-- See: lua/plugins/telescope.lua
|
-- See: lua/plugins/telescope.lua
|
||||||
{ '<leader><space>', "<cmd>lua require('telescope.builtin').buffers()<cr>", desc = 'Find existing buffers' },
|
{ '<leader><space>', "<cmd>lua require('telescope.builtin').buffers()<cr>", desc = 'Find existing buffers' },
|
||||||
{ '<leader><tab>', "<cmd>lua require('telescope.builtin').commands()<CR>", desc = 'Telescope: Commands' },
|
{ '<leader><tab>', "<cmd>lua require('telescope.builtin').commands()<CR>", desc = 'Telescope: Commands' },
|
||||||
{ '<leader>sS', "<cmd>lua require('telescope.builtin').git_status()<cr>", desc = 'Git Status' },
|
|
||||||
{ '<leader>sd', "<cmd>lua require('telescope.builtin').diagnostics()<cr>", desc = 'Search Diagnostics' },
|
{ '<leader>sd', "<cmd>lua require('telescope.builtin').diagnostics()<cr>", desc = 'Search Diagnostics' },
|
||||||
{ '<leader>sf', "<cmd>lua require('telescope.builtin').find_files()<cr>", desc = 'Search Files' },
|
|
||||||
{ '<leader>sg', "<cmd>lua require('telescope.builtin').live_grep()<cr>", desc = 'Search by Grep' },
|
{ '<leader>sg', "<cmd>lua require('telescope.builtin').live_grep()<cr>", desc = 'Search by Grep' },
|
||||||
{ '<leader>sm', '<cmd>Telescope harpoon marks<CR>', desc = 'Harpoon Marks' },
|
{ '<leader>sm', '<cmd>Telescope harpoon marks<CR>', desc = 'Harpoon Marks' },
|
||||||
{ '<leader>sn', "<cmd>lua require('telescope').extensions.notify.notify()<CR>", desc = 'Notify' },
|
{ '<leader>sn', "<cmd>lua require('telescope').extensions.notify.notify()<CR>", desc = 'Notify' },
|
||||||
{ '<leader>so', "<cmd>lua require('telescope.builtin').oldfiles()<cr>", desc = 'Find recently Opened files' },
|
{ '<leader>so', "<cmd>lua require('telescope.builtin').oldfiles()<cr>", desc = 'Find recently Opened files' },
|
||||||
|
{ '<leader>sp', "<cmd>lua require('telescope').extensions.lazy_plugins.lazy_plugins()<cr>", desc = 'Find neovim/lazy configs' },
|
||||||
{ '<leader>st', '<cmd>TodoTelescope<CR>', desc = 'Telescope: Todo' },
|
{ '<leader>st', '<cmd>TodoTelescope<CR>', desc = 'Telescope: Todo' },
|
||||||
{ '<leader>sw', "<cmd>lua require('telescope.builtin').grep_string()<cr>", desc = 'Search current Word' },
|
{ '<leader>sw', "<cmd>lua require('telescope.builtin').grep_string()<cr>", desc = 'Search current Word' },
|
||||||
|
|
||||||
|
|||||||
@@ -115,3 +115,6 @@ Noice
|
|||||||
fzf
|
fzf
|
||||||
linters
|
linters
|
||||||
LSPConfig
|
LSPConfig
|
||||||
|
deps
|
||||||
|
Noice
|
||||||
|
stdpath
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user