further fixes and mods. still not really done yet
This commit is contained in:
parent
6f352e7c11
commit
2e0d6e1637
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
-- See `:help mapleader`
|
-- See `:help mapleader`
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,12 @@ vim.opt.list = true
|
||||||
-- Use a vertical bar for tabs so ibl and listchars both show vertical guides
|
-- Use a vertical bar for tabs so ibl and listchars both show vertical guides
|
||||||
vim.opt.listchars = { tab = '│ ', trail = '·', nbsp = '␣' }
|
vim.opt.listchars = { tab = '│ ', trail = '·', nbsp = '␣' }
|
||||||
|
|
||||||
|
-- Set tab size and convert tabs to spaces
|
||||||
|
vim.opt.tabstop = 2 -- Number of visual spaces per TAB
|
||||||
|
vim.opt.shiftwidth = 2 -- Number of spaces to use for each step of (auto)indent
|
||||||
|
vim.opt.softtabstop = 2 -- Number of spaces that a <Tab> counts for while performing editing operations
|
||||||
|
vim.opt.expandtab = true -- Use spaces instead of tabs
|
||||||
|
|
||||||
-- Preview substitutions live, as you type!
|
-- Preview substitutions live, as you type!
|
||||||
vim.opt.inccommand = 'split'
|
vim.opt.inccommand = 'split'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
return { -- You can easily change to a different colorscheme.
|
return { -- You can easily change to a different colorscheme.
|
||||||
-- Change the name of the colorscheme plugin below, and then
|
-- Change the name of the colorscheme plugin below, and then
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
-- Database explorer and query runner
|
-- Database explorer and query runner
|
||||||
return {
|
return {
|
||||||
'tpope/vim-dadbod',
|
'tpope/vim-dadbod',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
local plugins = {}
|
local plugins = {}
|
||||||
|
|
||||||
local plugin_files = vim.fn.globpath(vim.fn.stdpath('config') .. '/lua/plugins', '*.lua', false, true)
|
local plugin_files = vim.fn.globpath(vim.fn.stdpath('config') .. '/lua/plugins', '*.lua', false, true)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
-- Quick navigation plugin
|
-- Quick navigation plugin
|
||||||
return {
|
return {
|
||||||
'ggandor/leap.nvim',
|
'ggandor/leap.nvim',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
return {
|
return {
|
||||||
'echasnovski/mini.sessions',
|
'echasnovski/mini.sessions',
|
||||||
version = '*',
|
version = '*',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: undefined-global
|
||||||
-- Import all configurations
|
-- Import all configurations
|
||||||
local core = require("plugins.snacks.core")
|
local core = require("plugins.snacks.core")
|
||||||
local display = require("plugins.snacks.display")
|
local display = require("plugins.snacks.display")
|
||||||
|
|
@ -27,7 +28,6 @@ return {
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
},
|
},
|
||||||
---@type snacks.Config
|
|
||||||
opts = merge_tables(
|
opts = merge_tables(
|
||||||
core,
|
core,
|
||||||
display,
|
display,
|
||||||
|
|
@ -44,6 +44,6 @@ return {
|
||||||
end,
|
end,
|
||||||
init = function()
|
init = function()
|
||||||
-- Make snacks available globally for debugging
|
-- Make snacks available globally for debugging
|
||||||
_G.Snacks = require("plugins.snacks")
|
_G.Snacks = require("plugins.snacks.init")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,73 +6,105 @@ return { -- Useful plugin to show you pending keybinds.
|
||||||
icons = {
|
icons = {
|
||||||
mappings = vim.g.have_nerd_font,
|
mappings = vim.g.have_nerd_font,
|
||||||
keys = vim.g.have_nerd_font and {} or {
|
keys = vim.g.have_nerd_font and {} or {
|
||||||
Up = '<Up> ', Down = '<Down> ', Left = '<Left> ', Right = '<Right> ',
|
Up = '<Up> ',
|
||||||
C = '<C-…> ', M = '<M-…> ', D = '<D-…> ', S = '<S-…> ',
|
Down = '<Down> ',
|
||||||
CR = '<CR> ', Esc = '<Esc> ', ScrollWheelDown = '<ScrollWheelDown> ',
|
Left = '<Left> ',
|
||||||
ScrollWheelUp = '<ScrollWheelUp> ', NL = '<NL> ', BS = '<BS> ',
|
Right = '<Right> ',
|
||||||
Space = '<Space> ', Tab = '<Tab> ', F1 = '<F1>', F2 = '<F2>',
|
C = '<C-…> ',
|
||||||
F3 = '<F3>', F4 = '<F4>', F5 = '<F5>', F6 = '<F6>',
|
M = '<M-…> ',
|
||||||
F7 = '<F7>', F8 = '<F8>', F9 = '<F9>', F10 = '<F10>',
|
D = '<D-…> ',
|
||||||
F11 = '<F11>', F12 = '<F12>',
|
S = '<S-…> ',
|
||||||
|
CR = '<CR> ',
|
||||||
|
Esc = '<Esc> ',
|
||||||
|
ScrollWheelDown = '<ScrollWheelDown> ',
|
||||||
|
ScrollWheelUp = '<ScrollWheelUp> ',
|
||||||
|
NL = '<NL> ',
|
||||||
|
BS = '<BS> ',
|
||||||
|
Space = '<Space> ',
|
||||||
|
Tab = '<Tab> ',
|
||||||
|
F1 = '<F1>',
|
||||||
|
F2 = '<F2>',
|
||||||
|
F3 = '<F3>',
|
||||||
|
F4 = '<F4>',
|
||||||
|
F5 = '<F5>',
|
||||||
|
F6 = '<F6>',
|
||||||
|
F7 = '<F7>',
|
||||||
|
F8 = '<F8>',
|
||||||
|
F9 = '<F9>',
|
||||||
|
F10 = '<F10>',
|
||||||
|
F11 = '<F11>',
|
||||||
|
F12 = '<F12>',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Document existing key chains
|
||||||
|
spec = {
|
||||||
|
{ '<leader>c', group = '[C]ode', desc = {
|
||||||
|
a = 'Code [A]ction',
|
||||||
|
f = '[F]ormat buffer',
|
||||||
|
}},
|
||||||
|
{ '<leader>d', group = '[D]ocument', desc = {
|
||||||
|
x = 'Document [D]iagnostics',
|
||||||
|
s = 'Document [S]ymbols',
|
||||||
|
[''] = 'Show diagnostic under cursor',
|
||||||
|
}},
|
||||||
|
{ '<leader>s', group = '[S]earch', desc = {
|
||||||
|
h = '[H]elp',
|
||||||
|
k = '[K]eymaps',
|
||||||
|
f = '[F]iles',
|
||||||
|
s = '[S]elect Telescope',
|
||||||
|
w = 'Current [W]ord',
|
||||||
|
g = '[G]rep',
|
||||||
|
d = '[D]iagnostics',
|
||||||
|
r = '[R]esume last search',
|
||||||
|
['/'] = 'Search in open files',
|
||||||
|
n = '[N]eovim config files',
|
||||||
|
}},
|
||||||
|
{ '<leader>l', group = '[L]SP/Language' },
|
||||||
|
{ '<leader>m', group = '[M]emory/Sessions' },
|
||||||
|
{ '<leader>D', group = '[D]atabase' },
|
||||||
|
{ '<leader>t', group = '[T]oggle', desc = {
|
||||||
|
h = 'Toggle inlay [H]ints',
|
||||||
|
}},
|
||||||
|
{ '<leader>w', group = '[W]orkspace', desc = {
|
||||||
|
s = '[S]ymbols',
|
||||||
|
}},
|
||||||
|
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
||||||
|
{ '<leader>g', group = '[G]it', desc = {
|
||||||
|
s = 'Status',
|
||||||
|
}},
|
||||||
|
{ '<leader>f', group = '[F]ile Explorer', desc = {
|
||||||
|
e = 'Toggle explorer',
|
||||||
|
f = 'Focus explorer',
|
||||||
|
}},
|
||||||
|
{ '<leader>n', group = '[N]otifications', desc = {
|
||||||
|
n = 'Toggle notifications',
|
||||||
|
h = 'Notification [H]istory',
|
||||||
|
c = '[C]lear notifications',
|
||||||
|
}},
|
||||||
|
{ '<leader>p', group = 'Debug/[P]rofile', desc = {
|
||||||
|
b = 'Toggle [B]reakpoint',
|
||||||
|
c = '[C]ontinue debugging',
|
||||||
|
n = 'Step over ([N]ext)',
|
||||||
|
i = 'Step [I]nto',
|
||||||
|
o = 'Step [O]ut',
|
||||||
|
r = 'Open [R]EPL',
|
||||||
|
l = 'Run [L]ast debug session',
|
||||||
|
x = 'Toggle debug UI',
|
||||||
|
}},
|
||||||
|
{ '<leader>b', group = '[B]uffer', desc = {
|
||||||
|
p = '[P]revious',
|
||||||
|
n = '[N]ext',
|
||||||
|
d = '[D]elete',
|
||||||
|
D = 'Force [D]elete',
|
||||||
|
}},
|
||||||
|
{ '<leader>q', desc = 'Open diagnostic [Q]uickfix list' },
|
||||||
|
{ '<leader>e', desc = 'Toggle file [E]xplorer' },
|
||||||
|
{ '<leader>o', desc = 'F[o]cus file explorer' },
|
||||||
|
{ '<leader>x', desc = 'Close buffer' },
|
||||||
|
{ '<leader>X', desc = 'Force close buffer' },
|
||||||
|
{ '<leader>/', desc = 'Search in current buffer' },
|
||||||
|
{ '<leader><leader>', desc = 'Find buffers' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
|
||||||
local wk = require('which-key')
|
|
||||||
wk.setup(opts)
|
|
||||||
wk.add({
|
|
||||||
{ "<leader>/", desc = "Search in current buffer" },
|
|
||||||
{ "<leader><leader>", desc = "Find buffers" },
|
|
||||||
{ "<leader>X", desc = "Force close buffer" },
|
|
||||||
{ "<leader>b", group = "[B]uffer" },
|
|
||||||
{ "<leader>bD", desc = "Force [D]elete" },
|
|
||||||
{ "<leader>bd", desc = "Delete buffer" },
|
|
||||||
{ "<leader>bn", desc = "Next buffer" },
|
|
||||||
{ "<leader>bp", desc = "Previous buffer" },
|
|
||||||
{ "<leader>c", group = "[C]ode" },
|
|
||||||
{ "<leader>ca", desc = "Code Action" },
|
|
||||||
{ "<leader>cf", desc = "Format buffer" },
|
|
||||||
{ "<leader>d", desc = "Show diagnostic under cursor" },
|
|
||||||
{ "<leader>ds", desc = "Document symbols" },
|
|
||||||
{ "<leader>dx", desc = "Document diagnostics" },
|
|
||||||
{ "<leader>e", desc = "Toggle file explorer" },
|
|
||||||
{ "<leader>f", group = "[F]ile Explorer" },
|
|
||||||
{ "<leader>fe", desc = "Toggle explorer" },
|
|
||||||
{ "<leader>ff", desc = "Focus explorer" },
|
|
||||||
{ "<leader>g", group = "[G]it" },
|
|
||||||
{ "<leader>gs", desc = "Status" },
|
|
||||||
{ "<leader>h", group = "Git [H]unk" },
|
|
||||||
{ "<leader>n", group = "[N]otifications" },
|
|
||||||
{ "<leader>nc", desc = "Clear notifications" },
|
|
||||||
{ "<leader>nh", desc = "Notification history" },
|
|
||||||
{ "<leader>nn", desc = "Toggle notifications" },
|
|
||||||
{ "<leader>o", desc = "Focus file explorer" },
|
|
||||||
{ "<leader>p", group = "Debug/[P]rofile" },
|
|
||||||
{ "<leader>pb", desc = "Toggle breakpoint" },
|
|
||||||
{ "<leader>pc", desc = "Continue debugging" },
|
|
||||||
{ "<leader>pi", desc = "Step into" },
|
|
||||||
{ "<leader>pl", desc = "Run last debug session" },
|
|
||||||
{ "<leader>pn", desc = "Step over" },
|
|
||||||
{ "<leader>po", desc = "Step out" },
|
|
||||||
{ "<leader>pr", desc = "Open REPL" },
|
|
||||||
{ "<leader>px", desc = "Toggle debug UI" },
|
|
||||||
{ "<leader>q", desc = "Open diagnostic quickfix list" },
|
|
||||||
{ "<leader>s", group = "[S]earch" },
|
|
||||||
{ "<leader>s/", desc = "Search in open files" },
|
|
||||||
{ "<leader>sd", desc = "Diagnostics" },
|
|
||||||
{ "<leader>sf", desc = "Files" },
|
|
||||||
{ "<leader>sg", desc = "Grep" },
|
|
||||||
{ "<leader>sh", desc = "Help" },
|
|
||||||
{ "<leader>sk", desc = "Keymaps" },
|
|
||||||
{ "<leader>sn", desc = "Neovim config files" },
|
|
||||||
{ "<leader>sr", desc = "Resume last search" },
|
|
||||||
{ "<leader>ss", desc = "Select Telescope" },
|
|
||||||
{ "<leader>sw", desc = "Current word" },
|
|
||||||
{ "<leader>t", group = "[T]oggle" },
|
|
||||||
{ "<leader>th", desc = "Toggle inlay hints" },
|
|
||||||
{ "<leader>w", group = "[W]orkspace" },
|
|
||||||
{ "<leader>ws", desc = "Symbols" },
|
|
||||||
{ "<leader>x", desc = "Close buffer" },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue