mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-28 04:45:33 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd8d72ab38 | |||
| 0908a23231 | |||
| 2e070eed83 | |||
| e22762255d |
@@ -28,3 +28,4 @@ bats 1.11.0
|
||||
gitleaks 8.18.4
|
||||
delta 0.18.1
|
||||
lazygit 0.44.0
|
||||
sops 3.9.0
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
ansible
|
||||
pipenv
|
||||
semgrep
|
||||
neovim
|
||||
|
||||
24
config/nvim/.neoconf.json
Normal file
24
config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": [
|
||||
"nvim-lspconfig",
|
||||
"lsp",
|
||||
"completion",
|
||||
]
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
},
|
||||
}
|
||||
},
|
||||
"lspconfig": {
|
||||
"lua_ls": {
|
||||
"Lua.completion.callSnippet": "Replace",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,18 @@
|
||||
-- Install lazylazy
|
||||
-- https://github.com/folke/lazy.nvim
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system {
|
||||
'git',
|
||||
'clone',
|
||||
'--filter=blob:none',
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
'--branch=stable', -- latest stable release
|
||||
lazypath,
|
||||
}
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
|
||||
{ out, 'WarningMsg' },
|
||||
{ '\nPress any key to exit...' },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
@@ -22,46 +25,10 @@ require('lazy').setup {
|
||||
checker = {
|
||||
-- Automatically check for updates
|
||||
enabled = true,
|
||||
nofity = false,
|
||||
},
|
||||
spec = {
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
-- https://github.com/folke/which-key.nvim
|
||||
{
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
priority = 1001, -- Make sure to load this as soon as possible
|
||||
config = function() -- This is the function that runs, AFTER loading
|
||||
local wk = require 'which-key'
|
||||
wk.setup()
|
||||
|
||||
wk.add {
|
||||
{ '<leader>b', group = '[b] Buffer' },
|
||||
{ '<leader>c', group = '[c] Code' },
|
||||
{ '<leader>d', group = '[d] Document' },
|
||||
{ '<leader>f', group = '[f] File' },
|
||||
{ '<leader>g', group = '[g] Git' },
|
||||
{ '<leader>l', group = '[l] LSP' },
|
||||
{ '<leader>o', group = '[o] Open' },
|
||||
{ '<leader>p', group = '[p] Project' },
|
||||
{ '<leader>q', group = '[q] Quit' },
|
||||
{ '<leader>s', group = '[s] Search' },
|
||||
{ '<leader>t', group = '[t] Toggle' },
|
||||
{ '<leader>w', group = '[w] Workspace' },
|
||||
{ '<leader>z', group = '[x] FZF' },
|
||||
{ '<leader>?', group = '[?] Help' },
|
||||
{
|
||||
'<leader>?w',
|
||||
function()
|
||||
wk.show { global = false }
|
||||
end,
|
||||
desc = 'Buffer Local Keymaps (which-key)',
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
-- Import plugins from `lua/plugins` directory
|
||||
{ import = 'plugins' },
|
||||
},
|
||||
}
|
||||
|
||||
require 'config.misc'
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
-- Go
|
||||
local format_sync_grp = vim.api.nvim_create_augroup('GoFormat', {})
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
pattern = '*.go',
|
||||
callback = function()
|
||||
require('go.format').goimport()
|
||||
end,
|
||||
group = format_sync_grp,
|
||||
})
|
||||
require('go').setup()
|
||||
@@ -1,15 +1,12 @@
|
||||
vim.api.nvim_set_keymap('i', 'jj', '<Esc>', { noremap = false })
|
||||
|
||||
-- twilight
|
||||
vim.api.nvim_set_keymap('n', 'tw', ':Twilight<enter>', { noremap = false })
|
||||
|
||||
-- buffers
|
||||
vim.api.nvim_set_keymap('n', '<leader>bk', ':blast<enter>', { desc = 'Last', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bj', ':bfirst<enter>', { desc = 'First', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bh', ':bprev<enter>', { desc = 'Prev', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bl', ':bnext<enter>', { desc = 'Next', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bd', ':bdelete<enter>', { desc = 'Delete', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<C-w>', ':bdelete<enter>', { desc = 'Delete buffer', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bk', ':blast<enter>', { desc = 'Buffer: Last', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bj', ':bfirst<enter>', { desc = 'Buffer: First', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bh', ':bprev<enter>', { desc = 'Buffer: Prev', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bl', ':bnext<enter>', { desc = 'Buffer: Next', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bd', ':Bdelete<enter>', { desc = 'Buffer: Delete', noremap = false })
|
||||
vim.api.nvim_set_keymap('n', '<leader>bw', ':Bwipeout<enter>', { desc = 'Buffer: Wipeout', noremap = false })
|
||||
|
||||
-- files
|
||||
vim.api.nvim_set_keymap('n', 'QQ', ':q!<enter>', { desc = 'Quickly Quit', noremap = false })
|
||||
@@ -34,9 +31,6 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
-- Noice
|
||||
vim.api.nvim_set_keymap('n', '<leader>nn', ':Noice dismiss<CR>', { desc = 'Noice dismiss', noremap = true })
|
||||
|
||||
vim.keymap.set('n', '<leader>xe', '<cmd>GoIfErr<cr>', { desc = 'Go If Error', silent = true, noremap = true })
|
||||
|
||||
-- TIP: Disable arrow keys in normal mode
|
||||
|
||||
@@ -78,3 +78,8 @@ vim.o.undofile = true
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
-- Fixes Notify opacity issues
|
||||
vim.o.termguicolors = true
|
||||
|
||||
-- Set spell checking
|
||||
vim.o.spell = true
|
||||
|
||||
vim.g.loaded_perl_provider = 0
|
||||
|
||||
@@ -6,7 +6,7 @@ return {
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
'<leader>cf',
|
||||
function()
|
||||
require('conform').format { async = true, lsp_fallback = true }
|
||||
end,
|
||||
|
||||
@@ -17,7 +17,21 @@ return {
|
||||
{
|
||||
'zbirenbaum/copilot-cmp',
|
||||
dependencies = {
|
||||
'zbirenbaum/copilot.lua',
|
||||
{
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
build = ':Copilot setup',
|
||||
event = { 'InsertEnter', 'LspAttach' },
|
||||
fix_pairs = true,
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
help = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
require('copilot_cmp').setup()
|
||||
@@ -25,7 +39,6 @@ return {
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
-- nvim-cmp setup
|
||||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
local lspkind = require 'lspkind'
|
||||
@@ -35,8 +48,11 @@ return {
|
||||
formatting = {
|
||||
format = lspkind.cmp_format {
|
||||
mode = 'symbol',
|
||||
max_width = 50,
|
||||
symbol_map = { Copilot = '' },
|
||||
min_width = 40,
|
||||
max_width = 100,
|
||||
symbol_map = {
|
||||
Copilot = ''
|
||||
},
|
||||
},
|
||||
},
|
||||
view = {
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
-- CoPilot
|
||||
-- https://github.com/zbirenbaum/copilot.lua
|
||||
return {
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
build = ':Copilot setup',
|
||||
event = { 'InsertEnter', 'LspAttach' },
|
||||
fix_pairs = true,
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
help = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,29 +1,30 @@
|
||||
return {
|
||||
|
||||
'ray-x/go.nvim',
|
||||
'ray-x/guihua.lua',
|
||||
|
||||
{
|
||||
'rcarriga/nvim-dap-ui',
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-dap',
|
||||
'nvim-neotest/nvim-nio',
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
'ray-x/go.nvim',
|
||||
'ray-x/guihua.lua',
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
keys = {
|
||||
{ '<leader>dt', '<cmd>DapUiToggle', desc = 'DAP: Toggle UI' },
|
||||
{ '<leader>db', '<cmd>DapToggleBreakpoint', desc = 'DAP: Toggle Breakpoint' },
|
||||
{ '<leader>dc', '<cmd>DapContinue', desc = 'DAP: Continue' },
|
||||
{ '<leader>dr', ":lua require('dapui').open({reset = true})<CR>", desc = 'DAP: Reset' },
|
||||
{ '<leader>ht', ":lua require('harpoon.ui').toggle_quick_menu()<CR>", desc = 'DAP: Harpoon UI' },
|
||||
},
|
||||
setup = function()
|
||||
require('dapui').setup()
|
||||
require('dap-go').setup()
|
||||
require('nvim-dap-virtual-text').setup()
|
||||
|
||||
vim.fn.sign_define('DapBreakpoint', { text = '🔴', texthl = 'DapBreakpoint', linehl = 'DapBreakpoint', numhl = 'DapBreakpoint' })
|
||||
|
||||
-- Debugger
|
||||
vim.api.nvim_set_keymap('n', '<leader>dt', ':DapUiToggle<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>db', ':DapToggleBreakpoint<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>dc', ':DapContinue<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>dr', ":lua require('dapui').open({reset = true})<CR>", { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>ht', ":lua require('harpoon.ui').toggle_quick_menu()<CR>", { noremap = true })
|
||||
vim.fn.sign_define(
|
||||
'DapBreakpoint',
|
||||
{ text = '🔴', texthl = 'DapBreakpoint', linehl = 'DapBreakpoint', numhl = 'DapBreakpoint' }
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,22 +5,22 @@ return {
|
||||
dependencies = {
|
||||
{ 'junegunn/fzf', run = ':call fzf#install()' },
|
||||
},
|
||||
config = function()
|
||||
keys = {
|
||||
-- Stolen from https://github.com/erikw/dotfiles/blob/d68d6274d67ac47afa20b9a0b9f3b0fa54bcdaf3/.config/nvim/lua/plugins.lua
|
||||
-- Comment must be on line of its own...
|
||||
-- Search for files in given path.
|
||||
vim.keymap.set('n', '<Leader>zf', ':FZF<space>', { silent = true, desc = 'FZF: search for files in given path.' })
|
||||
{ '<Leader><space>', ':FZF<space>', desc = 'FZF: search for files in given path.' },
|
||||
-- Sublime-like shortcut 'go to file' ctrl+p.
|
||||
vim.keymap.set('n', '<C-p>', ':Files<CR>', { silent = true, desc = 'FZF: search for files starting at current directory.' })
|
||||
vim.keymap.set('n', '<Leader>zc', ':Commands<CR>', { silent = true, desc = 'FZF: search commands.' })
|
||||
vim.keymap.set('n', '<Leader>zt', ':Tags<CR>', { silent = true, desc = 'FZF: search in tags file' })
|
||||
vim.keymap.set('n', '<Leader>zb', ':Buffers<CR>', { silent = true, desc = 'FZF: search open buffers.' })
|
||||
-- Ref: https://medium.com/@paulodiovani/vim-buffers-windows-and-tabs-an-overview-8e2a57c57afa).
|
||||
vim.keymap.set('n', '<Leader>zt', ':Windows<CR>', { silent = true, desc = 'FZF: search open tabs.' })
|
||||
vim.keymap.set('n', '<Leader>zh', ':History<CR>', { silent = true, desc = 'FZF: search history of opened files' })
|
||||
vim.keymap.set('n', '<Leader>zm', ':Maps<CR>', { silent = true, desc = 'FZF: search mappings.' })
|
||||
vim.keymap.set('n', '<Leader>zg', ':Rg<CR>', { silent = true, desc = 'FZF: search with rg (aka live grep).' })
|
||||
|
||||
{ '<C-p>', ':Files<CR>', desc = 'FZF: search for files starting at current directory.' },
|
||||
{ '<Leader>zc', ':Commands<CR>', desc = 'FZF: search commands.' },
|
||||
{ '<Leader>zt', ':Tags<CR>', desc = 'FZF: search in tags file' },
|
||||
{ '<Leader>zb', ':Buffers<CR>', desc = 'FZF: search open buffers.' },
|
||||
-- Ref: https://medium.com/@paulodiovani/vim-buffers-windows-and-tabs-an-overview-8e2a57c57afa
|
||||
{ '<Leader>zt', ':Windows<CR>', desc = 'FZF: search open tabs.' },
|
||||
{ '<Leader>zh', ':History<CR>', desc = 'FZF: search history of opened files' },
|
||||
{ '<Leader>zm', ':Maps<CR>', desc = 'FZF: search mappings.' },
|
||||
{ '<Leader>zg', ':Rg<CR>', desc = 'FZF: search with rg (aka live grep).' },
|
||||
},
|
||||
config = function()
|
||||
-- To ignore a certain path in a git project from both RG and FD used by FZF,
|
||||
-- the eaiest way is to create ignore files and exclude the in local git clone.
|
||||
-- Ref: https://stackoverflow.com/a/1753078/265508
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
return {
|
||||
|
||||
-- fugitive.vim: A Git wrapper so awesome, it should be illegal
|
||||
-- https://github.com/tpope/vim-fugitive
|
||||
{ 'tpope/vim-fugitive' },
|
||||
|
||||
-- Git integration for buffers
|
||||
-- https://github.com/lewis6991/gitsigns.nvim
|
||||
{
|
||||
@@ -19,7 +14,7 @@ return {
|
||||
},
|
||||
current_line_blame = false,
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
local gs = require 'gitsigns'
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
@@ -28,7 +23,7 @@ return {
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
map('n', 'gn', function()
|
||||
if vim.wo.diff then
|
||||
return ']c'
|
||||
end
|
||||
@@ -38,7 +33,7 @@ return {
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
map('n', '[c', function()
|
||||
map('n', 'gp', function()
|
||||
if vim.wo.diff then
|
||||
return '[c'
|
||||
end
|
||||
@@ -47,70 +42,8 @@ return {
|
||||
end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
-- Actions
|
||||
map({ 'n', 'v' }, '<leader>hs', ':Gitsigns stage_hunk<CR>')
|
||||
map({ 'n', 'v' }, '<leader>hr', ':Gitsigns reset_hunk<CR>')
|
||||
map('n', '<leader>hS', gs.stage_buffer)
|
||||
map('n', '<leader>ha', gs.stage_hunk)
|
||||
map('n', '<leader>hu', gs.undo_stage_hunk)
|
||||
map('n', '<leader>hR', gs.reset_buffer)
|
||||
map('n', '<leader>hp', gs.preview_hunk)
|
||||
map('n', '<leader>hb', function()
|
||||
gs.blame_line { full = true }
|
||||
end)
|
||||
map('n', '<leader>tB', gs.toggle_current_line_blame)
|
||||
map('n', '<leader>hd', gs.diffthis)
|
||||
map('n', '<leader>hD', function()
|
||||
gs.diffthis '~'
|
||||
end)
|
||||
|
||||
-- Text object
|
||||
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
|
||||
end,
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- git-worktree.nvim: Manage git worktrees
|
||||
-- https://github.com/ThePrimeagen/git-worktree.nvim
|
||||
{
|
||||
'ThePrimeagen/git-worktree.nvim',
|
||||
config = function()
|
||||
require('git-worktree').setup()
|
||||
end,
|
||||
},
|
||||
|
||||
-- An interactive and powerful Git interface for Neovim, inspired by Magit
|
||||
-- https://github.com/NeogitOrg/neogit
|
||||
{
|
||||
'NeogitOrg/neogit',
|
||||
config = function()
|
||||
-- This contains mainly Neogit but also a bunch of Git settings
|
||||
-- like fetching branches with telescope or blaming with fugitive
|
||||
local neogit = require 'neogit'
|
||||
|
||||
vim.keymap.set('n', '<leader>gs', neogit.open, { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>gc', ':Neogit commit<CR>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>gp', ':Neogit pull<CR>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>gP', ':Neogit push<CR>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>gb', ':Telescope git_branches<CR>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>gB', ':G blame<CR>', { silent = true, noremap = true })
|
||||
|
||||
neogit.setup {
|
||||
disable_commit_confirmation = true,
|
||||
disable_signs = false,
|
||||
disable_context_highlighting = false,
|
||||
disable_builtin_notifications = false,
|
||||
signs = {
|
||||
section = { '', '' },
|
||||
item = { '', '' },
|
||||
hunk = { '', '' },
|
||||
},
|
||||
integrations = {
|
||||
diffview = true,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,6 +2,14 @@ return {
|
||||
-- A small Neovim plugin for previewing definitions using floating windows.
|
||||
-- https://github.com/rmagatti/goto-preview
|
||||
'rmagatti/goto-preview',
|
||||
dependencies = {
|
||||
{ 'nvim-telescope/telescope.nvim' },
|
||||
},
|
||||
keys = {
|
||||
{ 'n', 'gpd', '<cmd>lua require("goto-preview").goto_preview_definition()<CR>' },
|
||||
{ 'n', 'gpi', '<cmd>lua require("goto-preview").goto_preview_implementation()<CR>' },
|
||||
{ 'n', 'gP', '<cmd>lua require("goto-preview").close_all_windows()<CR>' },
|
||||
},
|
||||
config = function()
|
||||
require('goto-preview').setup {
|
||||
width = 120, -- Width of the floating window
|
||||
|
||||
@@ -1,254 +1,262 @@
|
||||
-- Quickstart configs for Nvim LSP
|
||||
-- https://github.com/neovim/nvim-lspconfig
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
-- Useful status updates for LSP
|
||||
{
|
||||
'j-hui/fidget.nvim',
|
||||
opts = {
|
||||
notification = {
|
||||
window = {
|
||||
winblend = 50,
|
||||
align = 'top',
|
||||
-- Neovim plugin to manage global and project-local settings
|
||||
-- Should be included before LSP Config
|
||||
-- https://github.com/folke/neoconf.nvim
|
||||
{
|
||||
'folke/neoconf.nvim',
|
||||
keys = {
|
||||
{ '<leader>?c', '<cmd>Neoconf<CR>', desc = 'Neoconf: Open' },
|
||||
{ '<leader>?g', '<cmd>Neoconf global<CR>', desc = 'Neoconf: Global' },
|
||||
{ '<leader>?l', '<cmd>Neoconf local<CR>', desc = 'Neoconf: Local' },
|
||||
{ '<leader>?m', '<cmd>Neoconf lsp<CR>', desc = 'Neoconf: Show merged LSP config' },
|
||||
{ '<leader>?s', '<cmd>Neoconf show<CR>', desc = 'Neoconf: Show merged config' },
|
||||
},
|
||||
config = function()
|
||||
require('neoconf').setup()
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
-- Useful status updates for LSP
|
||||
{
|
||||
'j-hui/fidget.nvim',
|
||||
opts = {
|
||||
notification = {
|
||||
window = {
|
||||
winblend = 50,
|
||||
align = 'top',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'b0o/schemastore.nvim',
|
||||
{
|
||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- used for completion, annotations and signatures of Neovim apis
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
||||
'b0o/schemastore.nvim',
|
||||
{
|
||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- used for completion, annotations and signatures of Neovim apis
|
||||
'folke/lazydev.nvim',
|
||||
dependencies = {
|
||||
-- `wezterm-types` provides types for the Wezterm terminal
|
||||
{
|
||||
'justinsgithub/wezterm-types',
|
||||
as = 'wezterm',
|
||||
},
|
||||
},
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
||||
-- Load wezterm types when the `wezterm` word is found
|
||||
{ path = 'wezterm-types', mods = { 'wezterm' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
'folke/neoconf.nvim',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', 'dp', vim.diagnostic.goto_prev, { desc = 'Diagnostic: Goto Prev' })
|
||||
vim.keymap.set('n', 'dn', vim.diagnostic.goto_next, { desc = 'Diagnostic: Goto Next' })
|
||||
vim.keymap.set('n', '<leader>do', vim.diagnostic.open_float, { desc = 'Diagnostic: Open float' })
|
||||
vim.keymap.set('n', '<leader>dq', vim.diagnostic.setloclist, { desc = 'Diagnostic: Set loc list' })
|
||||
|
||||
-- LSP settings.
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
local on_attach = function(_, bufnr)
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = 'LSP: ' .. desc
|
||||
end
|
||||
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
|
||||
keys = {
|
||||
{ '<leader>do', '<cmd>lua vim.diagnostic.open_float()<CR>', desc = 'Diagnostic: Open float' },
|
||||
{ '<leader>dq', '<cmd>lua vim.diagnostic.setloclist()<CR>', desc = 'Diagnostic: Set loc list' },
|
||||
{ 'dn', '<cmd>lua vim.diagnostic.goto_next()<CR>', desc = 'Diagnostic: Goto Next' },
|
||||
{ 'dp', '<cmd>lua vim.diagnostic.goto_prev()<CR>', desc = 'Diagnostic: Goto Prev' },
|
||||
{ '<leader>cr', '<cmd>lua vim.lsp.buf.rename()<CR>', desc = 'LSP: Rename' },
|
||||
{ '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', desc = 'LSP: Code Action' },
|
||||
{ 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', desc = 'LSP: Goto Definition' },
|
||||
{ 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<CR>', desc = 'LSP: Goto References' },
|
||||
{ 'gI', '<cmd>lua vim.lsp.buf.implementation()<CR>', desc = 'LSP: Goto Implementation' },
|
||||
{ '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', desc = 'LSP: Type Definition' },
|
||||
{ '<leader>ds', '<cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>', desc = 'LSP: Document Symbols' },
|
||||
{ '<leader>ws', '<cmd>lua require("telescope.builtin").lsp_dynamic_workspace_symbols()<CR>', desc = 'LSP: Workspace Symbols' },
|
||||
{ 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', desc = 'LSP: Hover Documentation' },
|
||||
{ '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', desc = 'LSP: Signature Documentation' },
|
||||
{ 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', desc = 'LSP: Goto Declaration' },
|
||||
{ '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', desc = 'LSP: Workspace Add Folder' },
|
||||
{ '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', desc = 'LSP: Workspace Remove Folder' },
|
||||
{ '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', desc = 'LSP: Workspace List Folders' },
|
||||
},
|
||||
config = function()
|
||||
-- LSP settings.
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
local on_attach = function(_, bufnr)
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
if vim.lsp.buf.format then
|
||||
vim.lsp.buf.format()
|
||||
elseif vim.lsp.buf.formatting then
|
||||
vim.lsp.buf.formatting()
|
||||
end
|
||||
end, { desc = 'Format current buffer with LSP' })
|
||||
end
|
||||
|
||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
|
||||
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
|
||||
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
-- Setup mason so it can manage external tooling
|
||||
require('mason').setup()
|
||||
|
||||
-- See `:help K` for why this keymap
|
||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
local servers = {
|
||||
-- :help lspconfig-all for all pre-configured LSPs
|
||||
ast_grep = {},
|
||||
|
||||
-- Lesser used LSP functionality
|
||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||
nmap('<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, '[W]orkspace [L]ist Folders')
|
||||
actionlint = {}, -- GitHub Actions
|
||||
ansiblels = {}, -- Ansible
|
||||
bashls = {}, -- Bash
|
||||
css_variables = {}, -- CSS
|
||||
cssls = {}, -- CSS
|
||||
docker_compose_language_service = {}, -- Docker compose
|
||||
dockerls = {}, -- Docker
|
||||
eslint = {}, -- ESLint
|
||||
gitlab_ci_ls = {}, -- GitLab CI
|
||||
gopls = {}, -- Go
|
||||
html = {}, -- HTML
|
||||
intelephense = {}, -- PHP
|
||||
pest_ls = {}, -- Pest (PHP)
|
||||
phpactor = {}, -- PHP
|
||||
psalm = {}, -- PHP
|
||||
pyright = {}, -- Python
|
||||
semgrep = {}, -- Security
|
||||
shellcheck = {}, -- Shell scripts
|
||||
shfmt = {}, -- Shell scripts formatting
|
||||
stylelint_lsp = {}, -- Stylelint for S/CSS
|
||||
stylua = {}, -- Used to format Lua code
|
||||
tailwindcss = {}, -- Tailwind CSS
|
||||
terraformls = {}, -- Terraform
|
||||
tflint = {}, -- Terraform
|
||||
ts_ls = {}, -- TypeScript/JS
|
||||
typos_lsp = {}, -- Better writing
|
||||
volar = {}, -- Vue
|
||||
yamlls = {}, -- YAML
|
||||
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
if vim.lsp.buf.format then
|
||||
vim.lsp.buf.format()
|
||||
elseif vim.lsp.buf.formatting then
|
||||
vim.lsp.buf.formatting()
|
||||
end
|
||||
end, { desc = 'Format current buffer with LSP' })
|
||||
end
|
||||
|
||||
-- Setup mason so it can manage external tooling
|
||||
require('mason').setup()
|
||||
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
local servers = {
|
||||
-- :help lspconfig-all for all pre-configured LSPs
|
||||
ast_grep = {},
|
||||
|
||||
actionlint = {}, -- GitHub Actions
|
||||
ansiblels = {}, -- Ansible
|
||||
bashls = {}, -- Bash
|
||||
css_variables = {}, -- CSS
|
||||
cssls = {}, -- CSS
|
||||
docker_compose_language_service = {}, -- Docker compose
|
||||
dockerls = {}, -- Docker
|
||||
eslint = {}, -- ESLint
|
||||
gitlab_ci_ls = {}, -- GitLab CI
|
||||
gopls = {}, -- Go
|
||||
grammarly = {}, -- Grammar and better writing
|
||||
html = {}, -- HTML
|
||||
intelephense = {}, -- PHP
|
||||
jinja_lsp = {}, -- Jinja templates
|
||||
pest_ls = {}, -- Pest (PHP)
|
||||
phpactor = {}, -- PHP
|
||||
psalm = {}, -- PHP
|
||||
pyright = {}, -- Python
|
||||
semgrep = {}, -- Security
|
||||
shellcheck = {}, -- Shell scripts
|
||||
shfmt = {}, -- Shell scripts formatting
|
||||
stylelint_lsp = {}, -- Stylelint for S/CSS
|
||||
stylua = {}, -- Used to format Lua code
|
||||
tailwindcss = {}, -- Tailwind CSS
|
||||
terraformls = {}, -- Terraform
|
||||
tflint = {}, -- Terraform
|
||||
ts_ls = {}, -- TypeScript/JS
|
||||
typos_lsp = {}, -- Better writing
|
||||
volar = {}, -- Vue
|
||||
yamlls = {}, -- YAML
|
||||
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
-- filetypes = { ...},
|
||||
-- capabilities = {},
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = 'Replace',
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = 'Replace',
|
||||
},
|
||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||
diagnostics = { disable = { 'missing-fields' } },
|
||||
},
|
||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
||||
diagnostics = { disable = { 'missing-fields' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
jsonls = {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
yaml = {
|
||||
schemaStore = {
|
||||
-- You must disable built-in schemaStore support if you want to use
|
||||
-- this plugin and its advanced options like `ignore`.
|
||||
enable = false,
|
||||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||
url = '',
|
||||
jsonls = {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
yaml = {
|
||||
schemaStore = {
|
||||
-- You must disable built-in schemaStore support if you want to use
|
||||
-- this plugin and its advanced options like `ignore`.
|
||||
enable = false,
|
||||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
|
||||
url = '',
|
||||
},
|
||||
schemas = require('schemastore').yaml.schemas(),
|
||||
},
|
||||
schemas = require('schemastore').yaml.schemas(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'actionlint',
|
||||
'ansible-language-server',
|
||||
'ansible-lint',
|
||||
'bash-language-server',
|
||||
'blade-formatter',
|
||||
'codespell',
|
||||
'commitlint',
|
||||
'diagnostic-languageserver',
|
||||
'docker-compose-language-service',
|
||||
'dockerfile-language-server',
|
||||
'editorconfig-checker',
|
||||
'fixjson',
|
||||
'flake8',
|
||||
'html-lsp',
|
||||
'jq',
|
||||
'jsonlint',
|
||||
'luacheck',
|
||||
'php-cs-fixer',
|
||||
'phpcs',
|
||||
'phpmd',
|
||||
'semgrep',
|
||||
'shellcheck',
|
||||
'shfmt',
|
||||
'stylelint',
|
||||
'stylua',
|
||||
'yamllint',
|
||||
})
|
||||
require('mason-tool-installer').setup {
|
||||
ensure_installed = ensure_installed,
|
||||
auto_update = true,
|
||||
}
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'actionlint',
|
||||
'ansible-language-server',
|
||||
'ansible-lint',
|
||||
'bash-language-server',
|
||||
'blade-formatter',
|
||||
'commitlint',
|
||||
'diagnostic-languageserver',
|
||||
'docker-compose-language-service',
|
||||
'dockerfile-language-server',
|
||||
'editorconfig-checker',
|
||||
'fixjson',
|
||||
'flake8',
|
||||
'html-lsp',
|
||||
'jq',
|
||||
'jsonlint',
|
||||
'luacheck',
|
||||
'php-cs-fixer',
|
||||
'phpcs',
|
||||
'phpmd',
|
||||
'semgrep',
|
||||
'shellcheck',
|
||||
'shfmt',
|
||||
'stylelint',
|
||||
'stylua',
|
||||
'yamllint',
|
||||
})
|
||||
require('mason-tool-installer').setup {
|
||||
ensure_installed = ensure_installed,
|
||||
auto_update = true,
|
||||
}
|
||||
|
||||
-- Ensure the servers above are installed
|
||||
require('mason-lspconfig').setup {
|
||||
automatic_installation = true,
|
||||
ensure_installed = servers,
|
||||
}
|
||||
-- Ensure the servers above are installed
|
||||
require('mason-lspconfig').setup {
|
||||
automatic_installation = true,
|
||||
ensure_installed = servers,
|
||||
}
|
||||
|
||||
-- nvim-cmp supports additional completion capabilities
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
-- nvim-cmp supports additional completion capabilities
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
require('lspconfig')[lsp].setup {
|
||||
for _, lsp in ipairs(servers) do
|
||||
require('lspconfig')[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- Turn on lsp status information
|
||||
require('fidget').setup()
|
||||
|
||||
-- Example custom configuration for lua
|
||||
--
|
||||
-- Make runtime files discoverable to the server
|
||||
local runtime_path = vim.split(package.path, ';')
|
||||
table.insert(runtime_path, 'lua/?.lua')
|
||||
table.insert(runtime_path, 'lua/?/init.lua')
|
||||
|
||||
require('lspconfig').lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- Turn on lsp status information
|
||||
require('fidget').setup()
|
||||
|
||||
-- Example custom configuration for lua
|
||||
--
|
||||
-- Make runtime files discoverable to the server
|
||||
local runtime_path = vim.split(package.path, ';')
|
||||
table.insert(runtime_path, 'lua/?.lua')
|
||||
table.insert(runtime_path, 'lua/?/init.lua')
|
||||
|
||||
require('lspconfig').lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT)
|
||||
version = 'LuaJIT',
|
||||
-- Setup your lua path
|
||||
path = runtime_path,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT)
|
||||
version = 'LuaJIT',
|
||||
-- Setup your lua path
|
||||
path = runtime_path,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'sh',
|
||||
callback = function()
|
||||
vim.lsp.start {
|
||||
name = 'bash-language-server',
|
||||
cmd = { 'bash-language-server', 'start' },
|
||||
}
|
||||
end,
|
||||
})
|
||||
end,
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'sh',
|
||||
callback = function()
|
||||
vim.lsp.start {
|
||||
name = 'bash-language-server',
|
||||
cmd = { 'bash-language-server', 'start' },
|
||||
}
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = {
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
'folke/noice.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
|
||||
@@ -30,7 +30,7 @@ return {
|
||||
},
|
||||
cmd = 'Neotree',
|
||||
keys = {
|
||||
{ '<leader>e', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
|
||||
{ '<leader>e', ':Neotree reveal<CR>', desc = 'NeoTree reveal' },
|
||||
},
|
||||
opts = {
|
||||
close_if_last_window = true,
|
||||
|
||||
@@ -2,79 +2,83 @@ return {
|
||||
-- Highly experimental plugin that completely replaces the UI
|
||||
-- for messages, cmdline and the popupmenu.
|
||||
-- https://github.com/folke/noice.nvim
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
dependencies = {
|
||||
'MunifTanjim/nui.nvim',
|
||||
-- A fancy, configurable, notification manager for NeoVim
|
||||
-- https://github.com/rcarriga/nvim-notify
|
||||
{
|
||||
'rcarriga/nvim-notify',
|
||||
config = function()
|
||||
require('notify').setup {
|
||||
background_colour = '#000000',
|
||||
enabled = false,
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
setup = function()
|
||||
vim.g.noice_ignored_filetypes = { 'fugitiveblame', 'fugitive', 'gitcommit' }
|
||||
require('noice').setup {
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
views = {
|
||||
cmdline_popup = {
|
||||
position = {
|
||||
row = 5,
|
||||
col = '50%',
|
||||
},
|
||||
size = {
|
||||
width = 60,
|
||||
height = 'auto',
|
||||
},
|
||||
},
|
||||
popupmenu = {
|
||||
relative = 'editor',
|
||||
position = {
|
||||
row = 8,
|
||||
col = '50%',
|
||||
},
|
||||
size = {
|
||||
width = 60,
|
||||
height = 10,
|
||||
},
|
||||
border = {
|
||||
style = 'rounded',
|
||||
padding = { 0, 1 },
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' },
|
||||
},
|
||||
},
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = 'msg_show',
|
||||
any = {
|
||||
{ find = '%d+L, %d+B' },
|
||||
{ find = '; after #%d+' },
|
||||
{ find = '; before #%d+' },
|
||||
{ find = '%d fewer lines' },
|
||||
{ find = '%d more lines' },
|
||||
},
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
'folke/noice.nvim',
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
'MunifTanjim/nui.nvim',
|
||||
-- A fancy, configurable, notification manager for NeoVim
|
||||
-- https://github.com/rcarriga/nvim-notify
|
||||
'rcarriga/nvim-notify',
|
||||
'hrsh7th/nvim-cmp',
|
||||
},
|
||||
keys = {
|
||||
{ 'n', '<leader>tn', ':Noice dismiss<CR>', desc = 'Noice dismiss' },
|
||||
},
|
||||
config = function()
|
||||
vim.g.noice_ignored_filetypes = { 'fugitiveblame', 'fugitive', 'gitcommit', 'noice' }
|
||||
require('noice').setup {
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||
['vim.lsp.util.stylize_markdown'] = true,
|
||||
['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp
|
||||
},
|
||||
},
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = false, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = 'msg_show',
|
||||
any = {
|
||||
{ find = '%d+L, %d+B' },
|
||||
{ find = '; after #%d+' },
|
||||
{ find = '; before #%d+' },
|
||||
{ find = '%d fewer lines' },
|
||||
{ find = '%d more lines' },
|
||||
},
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
},
|
||||
views = {
|
||||
cmdline_popup = {
|
||||
position = {
|
||||
row = 5,
|
||||
col = '50%',
|
||||
},
|
||||
size = {
|
||||
width = 60,
|
||||
height = 'auto',
|
||||
},
|
||||
},
|
||||
popupmenu = {
|
||||
relative = 'editor',
|
||||
position = {
|
||||
row = 8,
|
||||
col = '50%',
|
||||
},
|
||||
size = {
|
||||
width = 60,
|
||||
height = 10,
|
||||
},
|
||||
border = {
|
||||
style = 'rounded',
|
||||
padding = { 0, 1 },
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
return {
|
||||
'epwalsh/obsidian.nvim',
|
||||
version = '*', -- recommended, use latest release instead of latest commit
|
||||
lazy = true,
|
||||
ft = 'markdown',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('obsidian').setup {
|
||||
workspaces = {
|
||||
{
|
||||
name = 'Notes',
|
||||
path = vim.fn.expand '$HOME/Code/ivuorinen/obsidian',
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -1,85 +1,92 @@
|
||||
return {
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
-- https://github.com/nvim-telescope/telescope.nvim
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{ 'nvim-telescope/telescope-symbols.nvim' },
|
||||
'nvim-telescope/telescope.nvim',
|
||||
version = '*',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{ 'nvim-telescope/telescope-symbols.nvim' },
|
||||
{ 'folke/which-key.nvim' },
|
||||
{ 'ThePrimeagen/harpoon' },
|
||||
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||
-- Only load if `make` is available
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make',
|
||||
cond = vim.fn.executable 'make' == 1,
|
||||
},
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||
-- Only load if `make` is available
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make',
|
||||
cond = vim.fn.executable 'make' == 1,
|
||||
},
|
||||
setup = function()
|
||||
local t = require 'telescope'
|
||||
local a = require 'telescope.actions'
|
||||
local b = require 'telescope.builtin'
|
||||
local themes = require 'telescope.themes'
|
||||
require('telescope').load_extension 'harpoon'
|
||||
t.load_extension 'git_worktree'
|
||||
},
|
||||
config = function()
|
||||
local t = require 'telescope'
|
||||
local a = require 'telescope.actions'
|
||||
local themes = require 'telescope.themes'
|
||||
|
||||
-- [[ Configure Telescope ]]
|
||||
-- See `:help telescope` and `:help telescope.setup()`
|
||||
t.setup {
|
||||
defaults = {
|
||||
layout_strategy = 'horizontal',
|
||||
layout_config = {
|
||||
preview_width = 0.65,
|
||||
horizontal = {
|
||||
size = {
|
||||
width = '95%',
|
||||
height = '95%',
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
theme = 'dropdown',
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-j>'] = a.move_selection_next,
|
||||
['<C-k>'] = a.move_selection_previous,
|
||||
['<C-d>'] = a.move_selection_previous,
|
||||
-- [[ Configure Telescope ]]
|
||||
-- See `:help telescope` and `:help telescope.setup()`
|
||||
t.setup {
|
||||
defaults = {
|
||||
layout_strategy = 'horizontal',
|
||||
layout_config = {
|
||||
preview_width = 0.65,
|
||||
horizontal = {
|
||||
size = {
|
||||
width = '95%',
|
||||
height = '95%',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
pickers = {
|
||||
find_files = {
|
||||
theme = 'dropdown',
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
['<C-u>'] = false,
|
||||
['<C-j>'] = a.move_selection_next,
|
||||
['<C-k>'] = a.move_selection_previous,
|
||||
['<C-d>'] = a.move_selection_previous,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(t.load_extension, 'fzf')
|
||||
-- Load extensions
|
||||
pcall(t.load_extension, 'harpoon')
|
||||
pcall(t.load_extension, 'git_worktree')
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(t.load_extension, 'fzf')
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
vim.keymap.set('n', '<leader>so', b.oldfiles, { desc = '[?] Find recently opened files' })
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
b.current_buffer_fuzzy_find(themes.get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = true,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer]' })
|
||||
-- [[ Telescope Keymaps ]]
|
||||
-- See `:help telescope.builtin`
|
||||
-- See `:help telescope.keymap`
|
||||
local b = require 'telescope.builtin'
|
||||
|
||||
vim.keymap.set('n', '<leader>sf', b.find_files, { desc = '[S]earch [F]iles' })
|
||||
vim.keymap.set('n', '<leader>sw', b.grep_string, { desc = '[S]earch current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>sg', b.live_grep, { desc = '[S]earch by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>sd', b.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
vim.keymap.set('n', '<leader>sb', b.buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<leader>sS', b.git_status, { desc = '' })
|
||||
vim.keymap.set('n', '<leader>sm', ':Telescope harpoon marks<CR>', { desc = 'Harpoon [M]arks' })
|
||||
vim.keymap.set('n', '<Leader>sr', "<CMD>lua require('telescope').extensions.git_worktree.git_worktrees()<CR>")
|
||||
vim.keymap.set('n', '<Leader>sR', "<CMD>lua require('telescope').extensions.git_worktree.create_git_worktree()<CR>")
|
||||
vim.keymap.set('n', '<Leader>sn', "<CMD>lua require('telescope').extensions.notify.notify()<CR>")
|
||||
local wk = require 'which-key'
|
||||
wk.add {
|
||||
-- { '<leader><space>', b.buffers, desc = '[ ] Find existing buffers' },
|
||||
{ '<leader>gR', "<cmd>lua require('telescope').extensions.git_worktree.create_git_worktree()<CR>", desc = 'Create Git worktree' },
|
||||
{ '<leader>gr', "<cmd>lua require('telescope').extensions.git_worktree.git_worktrees()<CR>", desc = 'Git worktrees' },
|
||||
{ '<leader>sS', b.git_status, desc = '' },
|
||||
{ '<leader>sd', b.diagnostics, desc = '[S]earch [D]iagnostics' },
|
||||
{ '<leader>sf', b.find_files, desc = '[S]earch [F]iles' },
|
||||
{ '<leader>sg', b.live_grep, desc = '[S]earch by [G]rep' },
|
||||
{ '<leader>sm', ':Telescope harpoon marks<CR>', desc = 'Harpoon Marks' },
|
||||
{ '<leader>sn', "<cmd>lua require('telescope').extensions.notify.notify()<CR>", desc = 'Notify' },
|
||||
{ '<leader>so', b.oldfiles, desc = '[?] Find recently opened files' },
|
||||
{ '<leader>sw', b.grep_string, desc = '[S]earch current [W]ord' },
|
||||
{ '<leader>st', ':TodoTelescope<CR>', desc = 'Telescope: Todo' },
|
||||
{ '<leader><tab>', "<Cmd>lua require('telescope.builtin').commands()<CR>", desc = 'Telescope: Commands' },
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap('n', 'st', ':TodoTelescope<CR>', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<Leader><tab>', "<Cmd>lua require('telescope.builtin').commands()<CR>", { noremap = false })
|
||||
end,
|
||||
},
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
b.current_buffer_fuzzy_find(themes.get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = true,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer]' })
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -2,6 +2,14 @@ return {
|
||||
'folke/trouble.nvim',
|
||||
lazy = false,
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
keys = {
|
||||
{ '<leader>xx', '<cmd>TroubleToggle<cr>', desc = 'Toggle Trouble' },
|
||||
{ '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>', desc = 'Toggle Workspace Diagnostics' },
|
||||
{ '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>', desc = 'Toggle Document Diagnostics' },
|
||||
{ '<leader>xl', '<cmd>TroubleToggle loclist<cr>', desc = 'Toggle Loclist' },
|
||||
{ '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', desc = 'Toggle Quickfix' },
|
||||
{ 'gR', '<cmd>TroubleToggle lsp_references<cr>', desc = 'Toggle LSP References' },
|
||||
},
|
||||
config = function()
|
||||
require('trouble').setup {
|
||||
auto_preview = false,
|
||||
@@ -9,12 +17,6 @@ return {
|
||||
auto_close = true,
|
||||
use_lsp_diagnostic_signs = true,
|
||||
}
|
||||
vim.keymap.set('n', '<leader>xx', '<cmd>TroubleToggle<cr>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', { silent = true, noremap = true })
|
||||
vim.keymap.set('n', 'gR', '<cmd>TroubleToggle lsp_references<cr>', { silent = true, noremap = true })
|
||||
|
||||
-- Diagnostic signs
|
||||
-- https://github.com/folke/trouble.nvim/issues/52
|
||||
|
||||
@@ -39,6 +39,9 @@ return {
|
||||
{
|
||||
'folke/twilight.nvim',
|
||||
ft = 'markdown', -- Highlight markdown files
|
||||
keys = {
|
||||
{ 'n', 'tw', '<cmd>Twilight<cr>', desc = 'Twilight' },
|
||||
},
|
||||
},
|
||||
|
||||
-- Seamless navigation between tmux panes and vim splits
|
||||
@@ -55,11 +58,11 @@ return {
|
||||
'TmuxNavigatePrevious',
|
||||
},
|
||||
keys = {
|
||||
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
|
||||
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
|
||||
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
|
||||
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
|
||||
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
|
||||
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>', desc = 'tmux: Navigate Left' },
|
||||
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>', desc = 'tmux: Navigate Down' },
|
||||
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>', desc = 'tmux: Navigate Up' },
|
||||
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>', desc = 'tmux: Navigate Right' },
|
||||
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>', desc = 'tmux: Navigate Previous' },
|
||||
},
|
||||
},
|
||||
-- Cloak allows you to overlay *'s over defined patterns in defined files.
|
||||
@@ -127,11 +130,11 @@ return {
|
||||
|
||||
wk.add {
|
||||
{ '<leader>cb', group = 'CommentBox' },
|
||||
{ '<Leader>cbt', '<Cmd>CBccbox<CR>', desc = 'CommentBox: Box Title' },
|
||||
{ '<Leader>cbd', '<Cmd>CBd<CR>', desc = 'Remove a box' },
|
||||
{ '<Leader>cbl', '<Cmd>CBline<CR>', desc = 'CommentBox: Simple Line' },
|
||||
{ '<Leader>cbm', '<Cmd>CBllbox14<CR>', desc = 'CommentBox: Marked' },
|
||||
{ '<Leader>cbt', '<Cmd>CBllline<CR>', desc = 'CommentBox: Titled Line' },
|
||||
{ '<leader>cbb', '<Cmd>CBccbox<CR>', desc = 'CommentBox: Box Title' },
|
||||
{ '<leader>cbd', '<Cmd>CBd<CR>', desc = 'CommentBox: Remove a box' },
|
||||
{ '<leader>cbl', '<Cmd>CBline<CR>', desc = 'CommentBox: Simple Line' },
|
||||
{ '<leader>cbm', '<Cmd>CBllbox14<CR>', desc = 'CommentBox: Marked' },
|
||||
{ '<leader>cbt', '<Cmd>CBllline<CR>', desc = 'CommentBox: Titled Line' },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
48
config/nvim/lua/plugins/which-key.lua
Normal file
48
config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
-- https://github.com/folke/which-key.nvim
|
||||
return {
|
||||
'folke/which-key.nvim',
|
||||
lazy = false,
|
||||
version = '*',
|
||||
priority = 1001, -- Make sure to load this as soon as possible
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'echasnovski/mini.icons',
|
||||
},
|
||||
config = function()
|
||||
local wk = require 'which-key'
|
||||
wk.setup()
|
||||
|
||||
wk.add {
|
||||
-- Groups
|
||||
{
|
||||
'<leader>b',
|
||||
group = '[b] Buffer',
|
||||
expand = function()
|
||||
return require('which-key.extras').expand.buf()
|
||||
end,
|
||||
},
|
||||
{ '<leader>c', group = '[c] Code' },
|
||||
{ '<leader>d', group = '[d] Document' },
|
||||
{ '<leader>g', group = '[g] Git' },
|
||||
{ '<leader>l', group = '[l] LSP' },
|
||||
{ '<leader>p', group = '[p] Project' },
|
||||
{ '<leader>q', group = '[q] Quit' },
|
||||
{ '<leader>s', group = '[s] Search' },
|
||||
{ '<leader>t', group = '[t] Toggle' },
|
||||
{ '<leader>w', group = '[w] Workspace' },
|
||||
{ '<leader>x', group = '[z] Trouble' },
|
||||
{ '<leader>z', group = '[x] FZF & Harpoon' },
|
||||
{ '<leader>?', group = '[?] Help' },
|
||||
{
|
||||
'<leader>?w',
|
||||
function()
|
||||
wk.show { global = false }
|
||||
end,
|
||||
desc = 'Buffer Local Keymaps (which-key)',
|
||||
},
|
||||
-- Misc keybinds
|
||||
{ 'QQ', ':q!<CR>', desc = 'Quit without saving' },
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
```txt
|
||||
|
||||
n <Esc> * <Cmd>nohlsearch<CR>
|
||||
n <Space>zg * :Rg<CR>
|
||||
FZF: search with rg (aka live grep).
|
||||
n <Space>zm * :Maps<CR>
|
||||
@@ -19,35 +18,85 @@ n <Space>zf * :FZF<Space>
|
||||
FZF: search for files in given path.
|
||||
n <Space>tc * <Cmd>CloakToggle<CR>
|
||||
[tc] Toggle Cloak
|
||||
n <Space>4 * <Lua 84: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
harpoon to file 4
|
||||
n <Space>3 * <Lua 83: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
harpoon to file 3
|
||||
n <Space>2 * <Lua 82: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
harpoon to file 2
|
||||
n <Space>1 * <Lua 81: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <Space>/ * <Lua 189: ~/.config/nvim/lua/plugins/telescope.lua:85>
|
||||
[/] Fuzzily search in current buffer]
|
||||
n <Space>ht * <Lua 267: ~/.config/nvim/lua/plugins/harpoon.lua:16>
|
||||
n <Space>1 * <Lua 65: ~/.config/nvim/lua/plugins/harpoon.lua:68>
|
||||
harpoon to file 1
|
||||
n <Space>xn * <Lua 80: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <Space>xn * <Lua 64: ~/.config/nvim/lua/plugins/harpoon.lua:61>
|
||||
harpoon to next file
|
||||
n <Space>xa * <Lua 79: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
harpoon quick menu
|
||||
n <Space>xN * <Lua 78: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <Space>xN * <Lua 63: ~/.config/nvim/lua/plugins/harpoon.lua:54>
|
||||
harpoon to previous file
|
||||
n <Space>xA * <Lua 77: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
harpoon file
|
||||
n <Space>5 * <Lua 76: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <Space>xa * <Lua 136: ~/.config/nvim/lua/plugins/harpoon.lua:40>
|
||||
Open harpoon window
|
||||
n <Space>5 * <Lua 61: ~/.config/nvim/lua/plugins/harpoon.lua:96>
|
||||
harpoon to file 5
|
||||
n <Space>tz * <Lua 51: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
[tz] Toggle ZenMode
|
||||
n <Space>e * <Lua 47: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
<Space>f * <Lua 40: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <Space>4 * <Lua 60: ~/.config/nvim/lua/plugins/harpoon.lua:89>
|
||||
harpoon to file 4
|
||||
n <Space>3 * <Lua 59: ~/.config/nvim/lua/plugins/harpoon.lua:82>
|
||||
harpoon to file 3
|
||||
n <Space>2 * <Lua 57: ~/.config/nvim/lua/plugins/harpoon.lua:75>
|
||||
harpoon to file 2
|
||||
n <Space>gB * :G blame<CR>
|
||||
n <Space>gb * :Telescope git_branches<CR>
|
||||
n <Space>gP * :Neogit push<CR>
|
||||
n <Space>gp * :Neogit pull<CR>
|
||||
n <Space>gc * :Neogit commit<CR>
|
||||
n <Space>gs * <Lua 121: ~/.local/share/nvim/lazy/neogit/lua/neogit.lua:151>
|
||||
n <Space>e * <Lua 96: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
NeoTree reveal
|
||||
n <Space>ca * <Lua 95: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Code Action
|
||||
n <Space>wl * <Lua 94: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Workspace List Folders
|
||||
n <Space>wr * <Lua 93: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Workspace Remove Folder
|
||||
n <Space>wa * <Lua 92: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Workspace Add Folder
|
||||
n <Space>ws * <Lua 91: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Workspace Symbols
|
||||
n <Space>D * <Lua 89: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Type Definition
|
||||
n <Space>dq * <Lua 87: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Diagnostic: Set loc list
|
||||
n <Space>do * <Lua 86: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Diagnostic: Open float
|
||||
n <Space>cr * <Lua 84: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Rename
|
||||
n <Space>ds * <Lua 83: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Document Symbols
|
||||
n <Space>?s * <Lua 78: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Neoconf: Show merged config
|
||||
n <Space>?m * <Lua 77: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Neoconf: Show merged LSP config
|
||||
n <Space>?l * <Lua 76: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Neoconf: Local
|
||||
n <Space>?g * <Lua 75: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Neoconf: Global
|
||||
n <Space>?c * <Lua 73: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Neoconf: Open
|
||||
<Space>f * <Lua 37: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
[f] Format buffer
|
||||
n <Space>qq * <Cmd>wq!<CR>
|
||||
Quickly Quit
|
||||
n <Space>bq * <Lua 28: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1984>
|
||||
Open diagnostic [Q]uickfix list
|
||||
n <Space>be * <Lua 27: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1694>
|
||||
Show diagnostic [E]rror messages
|
||||
[qq] Quickly Quit
|
||||
n <Space>xe * <Cmd>GoIfErr<CR>
|
||||
Go If Error
|
||||
v <Space> * <Nop>
|
||||
n <Space> * <Nop>
|
||||
n <Space>qf * :q<CR>
|
||||
Quicker close split
|
||||
n <Space>bw :Bwipeout<CR>
|
||||
Buffer: Wipeout
|
||||
n <Space>bd :Bdelete<CR>
|
||||
Buffer: Delete
|
||||
n <Space>bl :bnext<CR>
|
||||
Buffer: Next
|
||||
n <Space>bh :bprev<CR>
|
||||
Buffer: Prev
|
||||
n <Space>bj :bfirst<CR>
|
||||
Buffer: First
|
||||
n <Space>bk :blast<CR>
|
||||
Buffer: Last
|
||||
x # * <Lua 7: vim/_defaults.lua:0>
|
||||
:help v_#-default
|
||||
o % <Plug>(MatchitOperationForward)
|
||||
@@ -59,8 +108,17 @@ x * * <Lua 3: vim/_defaults.lua:0>
|
||||
:help v_star-default
|
||||
x @ * mode() == 'V' ? ':normal! @'.getcharstr().'<CR>' : '@'
|
||||
:help v_@-default
|
||||
n B ^
|
||||
n E $
|
||||
n K * <Lua 82: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Hover Documentation
|
||||
n QQ :q!<CR>
|
||||
Quickly Quit
|
||||
x Q * mode() == 'V' ? ':normal! @<C-R>=reg_recorded()<CR><CR>' : 'Q'
|
||||
:help v_Q-default
|
||||
x S <Plug>VSurround
|
||||
n WW :w!<CR>
|
||||
Force write
|
||||
n Y * y$
|
||||
:help Y-default
|
||||
o [% <Plug>(MatchitOperationMultiBackward)
|
||||
@@ -74,39 +132,39 @@ n ]% <Plug>(MatchitNormalMultiForward)
|
||||
n ]d * <Lua 14: vim/_defaults.lua:0>
|
||||
Jump to the next diagnostic
|
||||
x a% <Plug>(MatchitVisualTextObject)
|
||||
o al <Lua 247: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Around last textobject
|
||||
o an <Lua 246: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Around next textobject
|
||||
x al <Lua 243: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Around last textobject
|
||||
x an <Lua 242: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Around next textobject
|
||||
o a <Lua 240: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Around textobject
|
||||
x a <Lua 238: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Around textobject
|
||||
n dj * <Lua 26: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1222>
|
||||
Go to next [D]iagnostic message
|
||||
n dk * <Lua 25: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1145>
|
||||
Go to previous [D]iagnostic message
|
||||
n cS <Plug>CSurround
|
||||
n cs <Plug>Csurround
|
||||
n ds <Plug>Dsurround
|
||||
n dn * <Lua 81: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Diagnostic: Goto Next
|
||||
n dp * <Lua 80: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Diagnostic: Goto Prev
|
||||
o g% <Plug>(MatchitOperationBackward)
|
||||
x g% <Plug>(MatchitVisualBackward)
|
||||
n g% <Plug>(MatchitNormalBackward)
|
||||
x gS <Plug>VgSurround
|
||||
n gP * <Lua 265: ~/.local/share/nvim/lazy/goto-preview/lua/goto-preview.lua:132>
|
||||
Close preview windows
|
||||
n gpr * <Lua 264: ~/.local/share/nvim/lazy/goto-preview/lua/goto-preview.lua:114>
|
||||
Preview references
|
||||
n gpD * <Lua 263: ~/.local/share/nvim/lazy/goto-preview/lua/goto-preview.lua:105>
|
||||
Preview declaration
|
||||
n gpi * <Lua 262: ~/.local/share/nvim/lazy/goto-preview/lua/goto-preview.lua:91>
|
||||
Preview implementation
|
||||
n gpt * <Lua 261: ~/.local/share/nvim/lazy/goto-preview/lua/goto-preview.lua:77>
|
||||
Preview type definition
|
||||
n gpd * <Lua 259: ~/.local/share/nvim/lazy/goto-preview/lua/goto-preview.lua:63>
|
||||
Preview definition
|
||||
n gR * :RegexplainerToggle<CR>
|
||||
Toggle Regexplainer
|
||||
o g] <Lua 237: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1169>
|
||||
Move to right "around"
|
||||
x g] <Lua 236: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1169>
|
||||
Move to right "around"
|
||||
n g] <Lua 235: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1169>
|
||||
Move to right "around"
|
||||
o g[ <Lua 234: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1168>
|
||||
Move to left "around"
|
||||
x g[ <Lua 233: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1168>
|
||||
Move to left "around"
|
||||
n g[ <Lua 232: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1168>
|
||||
Move to left "around"
|
||||
n gd * <Lua 90: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Goto Definition
|
||||
n gr * <Lua 88: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Goto References
|
||||
n gI * <Lua 85: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Goto Implementation
|
||||
n gD * <Lua 79: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
LSP: Goto Declaration
|
||||
o gc * <Lua 13: vim/_defaults.lua:0>
|
||||
Comment textobject
|
||||
n gcc * <Lua 12: vim/_defaults.lua:0>
|
||||
@@ -119,54 +177,18 @@ x gx * <Lua 9: vim/_defaults.lua:0>
|
||||
Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)
|
||||
n gx * <Lua 8: vim/_defaults.lua:0>
|
||||
Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)
|
||||
o il <Lua 249: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Inside last textobject
|
||||
o in <Lua 248: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Inside next textobject
|
||||
x il <Lua 245: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Inside last textobject
|
||||
x in <Lua 244: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Inside next textobject
|
||||
o i <Lua 241: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Inside textobject
|
||||
x i <Lua 239: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
|
||||
Inside textobject
|
||||
n shn * <Lua 266: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Highlight next surrounding
|
||||
n sFn * <Lua 265: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Find next left surrounding
|
||||
n sfn * <Lua 264: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Find next right surrounding
|
||||
n srn * <Lua 263: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Replace next surrounding
|
||||
n sdn * <Lua 262: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Delete next surrounding
|
||||
n shl * <Lua 261: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Highlight previous surrounding
|
||||
n sFl * <Lua 260: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Find previous left surrounding
|
||||
n sfl * <Lua 259: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Find previous right surrounding
|
||||
n srl * <Lua 258: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Replace previous surrounding
|
||||
n sdl * <Lua 257: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Delete previous surrounding
|
||||
x sa * :<C-U>lua MiniSurround.add('visual')<CR>
|
||||
Add surrounding to selection
|
||||
n sn * <Lua 256: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:892>
|
||||
Update `MiniSurround.config.n_lines`
|
||||
n sh * <Lua 255: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Highlight surrounding
|
||||
n sF * <Lua 254: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Find left surrounding
|
||||
n sf * <Lua 253: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Find right surrounding
|
||||
n sr * <Lua 252: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Replace surrounding
|
||||
n sd * <Lua 251: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Delete surrounding
|
||||
n sa * <Lua 250: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
|
||||
Add surrounding
|
||||
n j * v:count == 0 ? 'gj' : 'j'
|
||||
n k * v:count == 0 ? 'gk' : 'k'
|
||||
n n * <Lua 71: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
Twilight
|
||||
n ss * :noh<CR>
|
||||
n tT * :TransparentToggle<CR>
|
||||
Toggle Transparency
|
||||
n ySS <Plug>YSsurround
|
||||
n ySs <Plug>YSsurround
|
||||
n yss <Plug>Yssurround
|
||||
n yS <Plug>YSurround
|
||||
n ys <Plug>Ysurround
|
||||
x <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
|
||||
o <Plug>(MatchitOperationMultiForward) * :<C-U>call matchit#MultiMatch("W", "o")<CR>
|
||||
o <Plug>(MatchitOperationMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "o")<CR>
|
||||
@@ -180,6 +202,20 @@ x <Plug>(MatchitVisualBackward) * :<C-U>call matchit#Match_wrapper('',0,'v')<CR
|
||||
x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv``
|
||||
n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
|
||||
n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
|
||||
n <C-Bslash> * :<C-U>TmuxNavigatePrevious<CR>
|
||||
n <C-J> * :<C-U>TmuxNavigateDown<CR>
|
||||
n <C-L> * :<C-U>TmuxNavigateRight<CR>
|
||||
n <C-H> * :<C-U>TmuxNavigateLeft<CR>
|
||||
v <Plug>VgSurround * :<C-U>call <SNR>28_opfunc(visualmode(),visualmode() ==# 'V' ? 0 : 1)<CR>
|
||||
v <Plug>VSurround * :<C-U>call <SNR>28_opfunc(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
|
||||
n <Plug>YSurround * <SNR>28_opfunc2('setup')
|
||||
n <Plug>Ysurround * <SNR>28_opfunc('setup')
|
||||
n <Plug>YSsurround * <SNR>28_opfunc2('setup').'_'
|
||||
n <Plug>Yssurround * '^'.v:count1.<SNR>28_opfunc('setup').'g_'
|
||||
n <Plug>CSurround * :<C-U>call <SNR>28_changesurround(1)<CR>
|
||||
n <Plug>Csurround * :<C-U>call <SNR>28_changesurround()<CR>
|
||||
n <Plug>Dsurround * :<C-U>call <SNR>28_dosurround(<SNR>28_inputtarget())<CR>
|
||||
n <Plug>SurroundRepeat * .
|
||||
n <C-P> * :Files<CR>
|
||||
FZF: search for files starting at current directory.
|
||||
o <Plug>(fzf-maps-o) * <C-C>:<C-U>call fzf#vim#maps('o', 0)<CR>
|
||||
@@ -187,21 +223,38 @@ x <Plug>(fzf-maps-x) * :<C-U>call fzf#vim#maps('x', 0)<CR>
|
||||
n <Plug>(fzf-maps-n) * :<C-U>call fzf#vim#maps('n', 0)<CR>
|
||||
n <Plug>(fzf-normal) * <Nop>
|
||||
n <Plug>(fzf-insert) * i
|
||||
n <C-Bslash> * <Lua 60: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
s <Plug>luasnip-jump-prev * <Lua 292: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:57>
|
||||
LuaSnip: Jump to the previous node
|
||||
s <Plug>luasnip-jump-next * <Lua 291: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:54>
|
||||
LuaSnip: Jump to the next node
|
||||
s <Plug>luasnip-prev-choice * <Lua 290: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:51>
|
||||
LuaSnip: Change to the previous choice from the choiceNode
|
||||
s <Plug>luasnip-next-choice * <Lua 289: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:48>
|
||||
LuaSnip: Change to the next choice from the choiceNode
|
||||
s <Plug>luasnip-expand-snippet * <Lua 288: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:45>
|
||||
LuaSnip: Expand the current snippet
|
||||
s <Plug>luasnip-expand-or-jump * <Lua 287: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:42>
|
||||
LuaSnip: Expand or jump in the current snippet
|
||||
<Plug>luasnip-expand-repeat * <Lua 285: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:35>
|
||||
LuaSnip: Repeat last node expansion
|
||||
n <Plug>luasnip-delete-check * <Lua 283: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:28>
|
||||
LuaSnip: Removes current snippet from jumplist
|
||||
n <Plug>PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))<CR>
|
||||
n <C-S> * <Cmd>w<CR>
|
||||
Save file
|
||||
n <C-K> * <Lua 57: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <C-J> * <Lua 56: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <C-H> * <Lua 58: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
n <C-K> * :<C-U>TmuxNavigateUp<CR>
|
||||
n <Down> * <Cmd>echo "Use j to move!!"<CR>
|
||||
n <Up> * <Cmd>echo "Use k to move!!"<CR>
|
||||
n <Right> * <Cmd>echo "Use l to move!!"<CR>
|
||||
n <Left> * <Cmd>echo "Use h to move!!"<CR>
|
||||
n <C-W>. * :vertical resize +10<CR>
|
||||
V Resize +
|
||||
n <C-W>, * :vertical resize -10<CR>
|
||||
V Resize -
|
||||
n <C-W><C-D> <C-W>d
|
||||
Show diagnostics under the cursor
|
||||
n <C-W>d * <Lua 16: vim/_defaults.lua:0>
|
||||
Show diagnostics under the cursor
|
||||
n <C-L> * <Lua 59: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
|
||||
```
|
||||
|
||||
- Generated on Sat 10 Aug 2024 13:01:59 EEST
|
||||
- Generated on Mon 23 Sep 2024 10:24:56 EEST
|
||||
|
||||
@@ -15,7 +15,7 @@ main()
|
||||
printf "\`\`\`txt"
|
||||
} > "$DEST"
|
||||
|
||||
NVIM_APPNAME="nvim-kickstart" nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q'
|
||||
nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q'
|
||||
|
||||
printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user