Compare commits
No commits in common. "master" and "getting-rid-of-nvchad" have entirely different histories.
master
...
getting-ri
149
init.lua
149
init.lua
|
@ -1,87 +1,88 @@
|
|||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ';'
|
||||
-- vim.g.python3_host_prog = '/usr/bin/python3'
|
||||
local opt = vim.opt
|
||||
local g = vim.g
|
||||
|
||||
vim.opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.clipboard = '' -- don't just use the system clipboard
|
||||
vim.opt.wrap = false
|
||||
vim.opt.breakindent = false
|
||||
vim.opt.conceallevel = 2
|
||||
vim.opt.concealcursor = 'c'
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undolevels = 10000
|
||||
vim.opt.writebackup = false
|
||||
vim.opt.history = 5000
|
||||
vim.opt.shada = { "'1000", '<50', 's10', 'h' }
|
||||
vim.g.syntax = true
|
||||
g.mapleader = ' '
|
||||
g.maplocalleader = ';'
|
||||
g.python3_host_prog = '/usr/bin/python3'
|
||||
|
||||
opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
||||
opt.signcolumn = 'yes'
|
||||
opt.clipboard = '' -- don't just use the system clipboard
|
||||
opt.wrap = false
|
||||
opt.breakindent = false
|
||||
opt.spell = false
|
||||
opt.conceallevel = 2
|
||||
opt.undofile = true
|
||||
opt.undolevels = 10000
|
||||
opt.writebackup = false
|
||||
opt.history = 5000
|
||||
opt.shada = { "'1000", '<50', 's10', 'h' }
|
||||
|
||||
-- Tabs and Indents
|
||||
-- ===
|
||||
vim.opt.textwidth = 80 -- Text width maximum chars before wrapping
|
||||
vim.opt.tabstop = 4 -- The number of spaces a tab is
|
||||
vim.opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
|
||||
vim.opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
|
||||
vim.opt.autoindent = true -- Use same indenting on new lines
|
||||
vim.opt.smartindent = true -- Smart autoindenting on new lines
|
||||
vim.opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
|
||||
|
||||
opt.textwidth = 80 -- Text width maximum chars before wrapping
|
||||
opt.tabstop = 4 -- The number of spaces a tab is
|
||||
opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
|
||||
opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
|
||||
opt.autoindent = true -- Use same indenting on new lines
|
||||
opt.smartindent = true -- Smart autoindenting on new lines
|
||||
opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
|
||||
|
||||
-- Timing
|
||||
-- ===
|
||||
vim.opt.ttimeout = true
|
||||
vim.opt.timeoutlen = 500 -- Time out on mappings
|
||||
vim.opt.ttimeoutlen = 10 -- Time out on key codes
|
||||
vim.opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
|
||||
opt.ttimeout = true
|
||||
opt.timeoutlen = 500 -- Time out on mappings
|
||||
opt.ttimeoutlen = 10 -- Time out on key codes
|
||||
opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
|
||||
|
||||
-- Searching
|
||||
-- ===
|
||||
vim.opt.ignorecase = true -- Search ignoring case
|
||||
vim.opt.smartcase = true -- Keep case when searching with *
|
||||
vim.opt.infercase = true -- Adjust case in insert completion mode
|
||||
vim.opt.incsearch = true -- Incremental search
|
||||
opt.ignorecase = true -- Search ignoring case
|
||||
opt.smartcase = true -- Keep case when searching with *
|
||||
opt.infercase = true -- Adjust case in insert completion mode
|
||||
opt.incsearch = true -- Incremental search
|
||||
vim.opt.hlsearch = true -- highlight searched stuff
|
||||
|
||||
-- Formatting
|
||||
-- ===
|
||||
|
||||
vim.opt.wrap = false -- No wrap by default
|
||||
vim.opt.linebreak = true -- Break long lines at 'breakat'
|
||||
vim.opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
||||
vim.opt.startofline = false -- Cursor in same column for few commands
|
||||
vim.opt.splitbelow = true -- Splits open bottom right
|
||||
vim.opt.splitright = true
|
||||
vim.opt.breakindentopt = { shift = 2, min = 20 }
|
||||
vim.opt.formatoptions = 'trowcnlm1jp' -- see :h fo-table & :h formatoptions
|
||||
opt.wrap = false -- No wrap by default
|
||||
opt.linebreak = true -- Break long lines at 'breakat'
|
||||
opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
||||
opt.startofline = false -- Cursor in same column for few commands
|
||||
opt.splitbelow = true -- Splits open bottom right
|
||||
opt.splitright = true
|
||||
opt.breakindentopt = { shift = 2, min = 20 }
|
||||
opt.formatoptions = '' -- see :h fo-table & :h formatoptions
|
||||
vim.opt.breakindent = true
|
||||
|
||||
-- Diff
|
||||
-- ===
|
||||
|
||||
vim.opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
|
||||
vim.opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
||||
opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
|
||||
opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
||||
|
||||
-- Folds
|
||||
-- ===
|
||||
|
||||
vim.opt.foldlevelstart = 60
|
||||
vim.opt.foldlevel = 60
|
||||
vim.opt.foldminlines = 5
|
||||
opt.foldlevel = 10 -- start with all folds open
|
||||
|
||||
-- Editor UI
|
||||
-- ===
|
||||
|
||||
vim.o.guifont = 'FiraCode Nerd Font:h15'
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.shortmess = 'xsTOInfFitloCaAs'
|
||||
vim.opt.showmode = true -- Show mode in cmd window
|
||||
vim.opt.scrolloff = 6 -- Keep at least n lines above/below
|
||||
vim.opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
||||
vim.opt.numberwidth = 2 -- Minimum number of columns to use for the line number
|
||||
vim.opt.number = true -- Show line numbers
|
||||
vim.opt.relativenumber = true -- Show relative line numbers
|
||||
vim.opt.ruler = true -- Default status ruler
|
||||
vim.opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
|
||||
vim.opt.laststatus = 3 -- Always show laststatus
|
||||
opt.termguicolors = true
|
||||
opt.shortmess = 'xsTOInfFitloCaAs'
|
||||
opt.showmode = true -- Show mode in cmd window
|
||||
opt.scrolloff = 10 -- Keep at least n lines above/below
|
||||
opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
||||
opt.numberwidth = 2 -- Minimum number of columns to use for the line number
|
||||
opt.number = true -- Show line numbers
|
||||
opt.relativenumber = true -- Show relative line numbers
|
||||
opt.ruler = true -- Default status ruler
|
||||
opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
|
||||
opt.laststatus = 3 -- Always show laststatus
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
|
@ -115,31 +116,31 @@ if vim.g.neovide == true then
|
|||
vim.g.neovide_fullscreen = true
|
||||
end
|
||||
|
||||
vim.opt.helpheight = 0 -- Disable help window resizing
|
||||
vim.opt.winwidth = 30 -- Minimum width for active window
|
||||
vim.opt.winminwidth = 1 -- Minimum width for inactive windows
|
||||
vim.opt.winheight = 1 -- Minimum height for active window
|
||||
vim.opt.winminheight = 1 -- Minimum height for inactive window
|
||||
opt.helpheight = 0 -- Disable help window resizing
|
||||
opt.winwidth = 30 -- Minimum width for active window
|
||||
opt.winminwidth = 1 -- Minimum width for inactive windows
|
||||
opt.winheight = 1 -- Minimum height for active window
|
||||
opt.winminheight = 1 -- Minimum height for inactive window
|
||||
|
||||
vim.opt.showcmd = false -- show command in status line
|
||||
vim.opt.cmdheight = 0
|
||||
vim.opt.cmdwinheight = 5 -- Command-line lines
|
||||
vim.opt.equalalways = true -- Resize windows on split or close
|
||||
vim.opt.colorcolumn = '80' -- Column highlight at textwidth's max character-limit
|
||||
opt.showcmd = false -- show command in status line
|
||||
opt.cmdheight = 0
|
||||
opt.cmdwinheight = 5 -- Command-line lines
|
||||
opt.equalalways = true -- Resize windows on split or close
|
||||
opt.colorcolumn = '+0' -- Column highlight at textwidth's max character-limit
|
||||
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.cursorlineopt = { 'number', 'screenline' }
|
||||
opt.cursorline = true
|
||||
opt.cursorlineopt = { 'number', 'screenline' }
|
||||
|
||||
vim.opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
||||
vim.opt.pumwidth = 10 -- Minimum width for the popup menu
|
||||
vim.opt.pumblend = 10 -- Popup blend
|
||||
opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
||||
opt.pumwidth = 10 -- Minimum width for the popup menu
|
||||
opt.pumblend = 10 -- Popup blend
|
||||
|
||||
-- Spelling correction
|
||||
-- ===
|
||||
|
||||
vim.opt.spell = true -- manually enable spell with `set spell` or `<leader>ts`
|
||||
vim.opt.spelllang = 'en,de_de'
|
||||
vim.opt.spellsuggest = 'double,50,timeout:5000'
|
||||
opt.spell = false -- manually enable spell with `set spell` or `<leader>ts`
|
||||
opt.spelllang = 'en,de_de,'
|
||||
opt.spellsuggest = 'double,50,timeout:5000'
|
||||
|
||||
-- autocommands
|
||||
-- ===
|
||||
|
@ -174,10 +175,8 @@ end ---@diagnostic disable-next-line: undefined-field
|
|||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require 'custom.maps'
|
||||
require 'custom.autocmds'
|
||||
require('lazy').setup({
|
||||
{ import = 'custom.plugins' },
|
||||
{ import = 'kickstart.plugins.debug' },
|
||||
}, {
|
||||
ui = {
|
||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
local augroup = vim.api.nvim_create_augroup('plex_generic_autocmds', {})
|
||||
|
||||
-- enable text wrapping for text filetypes
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'tex',
|
||||
'text',
|
||||
'markdown',
|
||||
'help',
|
||||
'typst',
|
||||
},
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
end,
|
||||
})
|
||||
|
||||
-- use html for htmldjango
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'html',
|
||||
},
|
||||
callback = function()
|
||||
vim.bo.filetype = 'html'
|
||||
end,
|
||||
})
|
||||
|
||||
-- always use the tex filetype for latex things, as those are most supported by
|
||||
-- latex language servers.
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'latex',
|
||||
'plaintex',
|
||||
},
|
||||
callback = function()
|
||||
vim.bo.filetype = 'tex'
|
||||
end,
|
||||
})
|
||||
|
||||
-- conceallevel is what converts things like **bold** to be displayed as bold
|
||||
-- without the stars. This is useful, but we might not want it for some
|
||||
-- filetypes.
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'latex',
|
||||
'markdown',
|
||||
'plaintex',
|
||||
'tex',
|
||||
'typst',
|
||||
},
|
||||
callback = function()
|
||||
vim.opt_local.conceallevel = 0
|
||||
vim.opt_local.concealcursor = ''
|
||||
end,
|
||||
})
|
||||
|
||||
-- Enable spellcheck for some types
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'latex',
|
||||
'markdown',
|
||||
'typst',
|
||||
'plaintex',
|
||||
'tex',
|
||||
},
|
||||
callback = function()
|
||||
vim.cmd [[set spell]]
|
||||
end,
|
||||
})
|
||||
|
||||
-- disable auto formatting for some filetypes
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'TelescopePrompt',
|
||||
},
|
||||
callback = function()
|
||||
vim.opt_local.formatoptions = ''
|
||||
end,
|
||||
})
|
||||
|
||||
-- tweak colorschemes and highlights after loading a new colorscheme
|
||||
vim.api.nvim_create_autocmd('ColorScheme', {
|
||||
group = augroup,
|
||||
callback = function()
|
||||
vim.cmd [[highlight Comment gui=NONE]] -- no italics for comments
|
||||
end,
|
||||
})
|
||||
|
||||
-- pin main.typ for typst projects
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
pattern = {
|
||||
'typst',
|
||||
},
|
||||
callback = function()
|
||||
-- pin the main file
|
||||
vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { vim.api.nvim_buf_get_name(0) } }
|
||||
-- -- unpin the main file
|
||||
-- vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { nil } }
|
||||
end,
|
||||
})
|
|
@ -20,27 +20,48 @@ vim.keymap.set({ 't', 'i', 'v', 'n' }, '<A-k>', '<C-u>', { desc = 'move a many l
|
|||
vim.keymap.set({ 'v', 'n' }, 'H', '<Home>', { desc = 'move to start of line' })
|
||||
vim.keymap.set({ 'v', 'n' }, 'L', '<End>', { desc = 'move to end of line' })
|
||||
|
||||
-- make j and k move by visual lines, not actual lines
|
||||
vim.keymap.set({ 'v', 'n' }, 'j', 'gj', { desc = 'move up' })
|
||||
vim.keymap.set({ 'v', 'n' }, 'k', 'gk', { desc = 'move down' })
|
||||
|
||||
-- move+scroll
|
||||
vim.keymap.set({ 'v', 'n' }, 'zk', '<C-e>', { desc = 'move and scroll up' })
|
||||
vim.keymap.set({ 'v', 'n' }, 'zj', '<C-y>', { desc = 'move and scroll down' })
|
||||
|
||||
-- go to beginning and end in insert mode
|
||||
vim.keymap.set('i', '<C-S-h>', '<esc>^i', { desc = 'Go to the start of the line' })
|
||||
vim.keymap.set('i', '<C-S-l>', '<End>', { desc = 'Go to the end of the line' })
|
||||
vim.keymap.set('i', '<C-w>', '<esc>lwi', { desc = 'Go a word further' })
|
||||
vim.keymap.set('i', '<C-b>', '<esc>lbi', { desc = 'Go a word backward' })
|
||||
vim.keymap.set('i', '<C-e>', '<esc>lea', { desc = 'Go a to next word end' })
|
||||
vim.keymap.set('i', '<C-s>', '<esc>^i', { desc = 'Go to the start of the line' })
|
||||
vim.keymap.set('i', '<C-e>', '<End>', { desc = 'Go to the end of the line' })
|
||||
vim.keymap.set('i', '<C-w>', '<esc>wa', { desc = 'Go a word further' })
|
||||
vim.keymap.set('i', '<C-b>', '<esc>ba', { desc = 'Go a word backward' })
|
||||
|
||||
-- navigate hjkl in insert mode
|
||||
vim.keymap.set('i', '<C-h>', '<Left>', { desc = 'Move left' })
|
||||
vim.keymap.set('i', '<C-j>', '<Down>', { desc = 'Move down' })
|
||||
vim.keymap.set('i', '<C-k>', '<Up>', { desc = 'Move up' })
|
||||
vim.keymap.set('i', '<C-l>', '<Right>', { desc = 'Move right' })
|
||||
vim.keymap.set('i', '<C-j>', '<Right>', { desc = 'Move right' })
|
||||
vim.keymap.set('i', '<C-k>', '<Down>', { desc = 'Move down' })
|
||||
vim.keymap.set('i', '<C-l>', '<Up>', { desc = 'Move up' })
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Workspace, buffer and window manipulation
|
||||
--------------------------------------------------------------------------------
|
||||
-- split windows
|
||||
vim.keymap.set('n', '<leader>"', '<cmd>vsplit<cr>', { desc = 'Split the window vertically' })
|
||||
vim.keymap.set('n', '<leader>%', '<cmd>split<cr>', { desc = 'Split the window horizontally' })
|
||||
|
||||
-- window actions
|
||||
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew [B]uffer' })
|
||||
vim.keymap.set('n', '<leader>wbc', '<cmd>bw<cr>', { desc = '[C]lose current [B]uffer' }) -- :bd would keep in background
|
||||
vim.keymap.set('n', '<C-Up>', '<cmd>resize +1<cr>', { desc = 'Resize window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<cmd>resize -1<cr>', { desc = 'Resize window' })
|
||||
vim.keymap.set('n', '<C-Left>', '<cmd>vertical resize +1<cr>', { desc = 'Resize window vertically' })
|
||||
vim.keymap.set('n', '<C-Right>', '<cmd>vertical resize -1<cr>', { desc = 'Resize window vertically' })
|
||||
|
||||
-- tabs/workspaces
|
||||
vim.keymap.set('n', '<leader>wn', '<cmd>tabnew<cr>', { desc = 'Open a [N]ew [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>wc', '<cmd>tabclose<cr>', { desc = '[C]lose a [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>wk', '<cmd>tabnext<cr>', { desc = 'Next [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>wj', '<cmd>tabprevious<cr>', { desc = 'Last [W]orkspace/Tab' })
|
||||
|
||||
vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true, true, true), { desc = 'Leave terminal mode' })
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Move to things
|
||||
--------------------------------------------------------------------------------
|
||||
-- move to window
|
||||
-- See `:help wincmd` for a list of all window commands
|
||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
|
@ -52,40 +73,6 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
|||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||
|
||||
-- let me out!!!
|
||||
vim.keymap.set({ 'n', 'v' }, 'qqq', '<cmd>bnext<cr><cmd>bd #<cr>', { desc = '[Q]uit the current window' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<A-c>', '<cmd>bnext<cr><cmd>bc #<cr>', { desc = '[C]lose the current buffer' })
|
||||
|
||||
vim.keymap.set({ 'n' }, '#', "'", { desc = '[Q]uit the current window' })
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Workspace, buffer and window manipulation
|
||||
--------------------------------------------------------------------------------
|
||||
-- split windows
|
||||
vim.keymap.set('n', '<leader>"', '<cmd>vsplit<cr>', { desc = 'Split the window vertically' })
|
||||
vim.keymap.set('n', '<leader>%', '<cmd>split<cr>', { desc = 'Split the window horizontally' })
|
||||
vim.keymap.set('n', '<leader>w"', '<cmd>vnew<cr>', { desc = 'Split the window vertically (new buffer)' })
|
||||
vim.keymap.set('n', '<leader>w%', '<cmd>new<cr>', { desc = 'Split the window horizontally (new buffer)' })
|
||||
|
||||
-- window actions
|
||||
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew buffer' })
|
||||
vim.keymap.set('n', '<leader>wbc', '<cmd>bw<cr>', { desc = '[C]lose current buffer' }) -- :bd would keep in background
|
||||
vim.keymap.set('n', '<C-Up>', '<cmd>resize +1<cr>', { desc = 'Resize window' })
|
||||
vim.keymap.set('n', '<C-Down>', '<cmd>resize -1<cr>', { desc = 'Resize window' })
|
||||
vim.keymap.set('n', '<C-Left>', '<cmd>vertical resize +1<cr>', { desc = 'Resize window vertically' })
|
||||
vim.keymap.set('n', '<C-Right>', '<cmd>vertical resize -1<cr>', { desc = 'Resize window vertically' })
|
||||
|
||||
-- tabs/workspaces
|
||||
vim.keymap.set('n', '<Tab>', '<cmd>bnext<cr>', { desc = 'Next Buffer' })
|
||||
vim.keymap.set('n', '<S-Tab>', '<cmd>bprev<cr>', { desc = 'Last Buffer' })
|
||||
vim.keymap.set('n', '<leader>wn', '<cmd>tabnew<cr>', { desc = 'Open a [N]ew [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>wc', '<cmd>tabclose<cr>', { desc = '[C]lose a [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>wk', '<cmd>tabnext<cr>', { desc = 'Next [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>wj', '<cmd>tabprevious<cr>', { desc = 'Last [W]orkspace/Tab' })
|
||||
vim.keymap.set('n', '<leader>n', '<cmd>enew<cr>', { desc = '[N]ew Buffer' })
|
||||
|
||||
vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true, true, true), { desc = 'Leave terminal mode' })
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Editing
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -93,41 +80,22 @@ vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true,
|
|||
vim.keymap.set({ 'n', 'v' }, '<leader>y', '"+y', { desc = '[Y]ank to system' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>Y', '"+Y', { desc = '[Y]ank to system' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>yy', '"+yy', { desc = '[Y]ank to system' })
|
||||
|
||||
-- paste from system clipboard
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>p', '"+p', { desc = '[P]aste from system' })
|
||||
vim.keymap.set({ 't', 'n', 'v' }, '<C-S-v>', '<C-w>"+pi', { desc = 'Paste the system clipboard' })
|
||||
|
||||
-- do not overwrite the register when pasting (kept defaults)
|
||||
vim.keymap.set({ 'v' }, 'P', 'P', { desc = '[P]aste to selected' })
|
||||
vim.keymap.set({ 'v' }, 'p', 'p', { desc = '[p]aste to selected and copy to register' })
|
||||
|
||||
-- add lines from normal and visual, without insert mode
|
||||
vim.keymap.set({ 'n', 'v' }, 'OO', 'O<Esc>', { desc = 'Insert a line above' })
|
||||
vim.keymap.set({ 'n', 'v' }, 'oo', 'o<Esc>', { desc = 'Insert a line below' })
|
||||
|
||||
-- add lines from normal and visual, with insert mode
|
||||
vim.keymap.set({ 'n', 'v' }, 'O', 'O', { desc = 'Insert a line above and insert' })
|
||||
vim.keymap.set({ 'n', 'v' }, 'o', 'o', { desc = 'Insert a line below and insert' })
|
||||
vim.keymap.set({ 'n', 'v' }, 'Oi', 'O', { desc = 'Insert a line above and insert' })
|
||||
vim.keymap.set({ 'n', 'v' }, 'oi', 'o', { desc = 'Insert a line below and insert' })
|
||||
|
||||
-- make current line a blank line
|
||||
vim.keymap.set({ 'n', 'v' }, 'do', 'Vc<Esc>', { desc = '[D]o [O]ver / Rewrite line' })
|
||||
|
||||
-- substitute, normally on 's', but the leap plugin is more useful on 's'
|
||||
vim.keymap.set({ 'n' }, '<leader>s', 's', { desc = '[S]ubstitute hovered text' })
|
||||
|
||||
-- do something useful with the arrow keys:
|
||||
-- move lines up/down and change indentation
|
||||
vim.keymap.set({ 'n', 'v' }, '<Up>', '<cmd> move-2<cr>', { desc = 'Move line up' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<Down>', '<cmd> move+1<cr>', { desc = 'Move line down' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<Down>', '<cmd> move+2<cr>', { desc = 'Move line down' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<Left>', '<<', { desc = 'Less indentation' })
|
||||
vim.keymap.set({ 'n', 'v' }, '<Right>', '>>', { desc = 'More indentation' })
|
||||
|
||||
-- format a long line into multiple with length 80
|
||||
vim.keymap.set({ 'v' }, '<leader>fl', ':!fmt -w80<CR>', { desc = '[F]ormat long [L]ines into smaller ones' })
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Formating
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -141,16 +109,3 @@ end, { desc = '[F]ormat buffer (no plugin)' })
|
|||
vim.keymap.set('n', '<leader>fw', function()
|
||||
require('mini.trailspace').trim()
|
||||
end, { desc = '[F]ormat remove [W]hitespace' })
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Formating
|
||||
--------------------------------------------------------------------------------
|
||||
-- discard F15
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<S-F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<A-F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-S-F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-A-F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<A-S-F15>', '<Nop>')
|
||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-A-S-F15>', '<Nop>')
|
||||
|
|
|
@ -53,11 +53,11 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
|
||||
-- Rename the variable under your cursor.
|
||||
-- Most Language Servers support renaming across files, etc.
|
||||
map('<leader>cr', vim.lsp.buf.rename, '[R]ename')
|
||||
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
|
||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||
-- or a suggestion from your LSP for this to activate.
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[A]ction')
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
|
||||
-- Opens a popup that displays documentation about the word under your cursor
|
||||
-- See `:help K` for why this keymap.
|
||||
|
@ -138,14 +138,29 @@ local servers = {
|
|||
-- tsserver = {},
|
||||
--
|
||||
|
||||
tinymist = {},
|
||||
html = {},
|
||||
cssls = {},
|
||||
tsserver = {},
|
||||
clangd = {},
|
||||
pyright = {},
|
||||
bashls = {},
|
||||
cmake = {},
|
||||
yamlls = {},
|
||||
texlab = {},
|
||||
basedpyright = {
|
||||
root_dir = vim.loop.cwd,
|
||||
flags = { debounce_text_changes = 300 },
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
diagnosticMode = 'openFilesOnly',
|
||||
useLibraryCodeForTypes = true,
|
||||
typeCheckingMode = 'basic',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
|
@ -159,7 +174,6 @@ local servers = {
|
|||
prefix = 'self',
|
||||
},
|
||||
cargo = {
|
||||
features = 'all',
|
||||
buildScripts = {
|
||||
enable = true,
|
||||
},
|
||||
|
@ -171,9 +185,7 @@ local servers = {
|
|||
},
|
||||
},
|
||||
ltex = {
|
||||
use_spellfile = true,
|
||||
autostart = false,
|
||||
filetypes = { 'latex', 'tex', 'markdown', 'typst' },
|
||||
use_spellfile = false,
|
||||
settings = {
|
||||
ltex = {
|
||||
checkFrequency = 'save', -- shut up while i'm just editing, see <https://github.com/folke/noice.nvim/issues/166>
|
||||
|
@ -183,7 +195,6 @@ local servers = {
|
|||
enabled = {
|
||||
'bibtex',
|
||||
'tex',
|
||||
'typst',
|
||||
'latex',
|
||||
'gitcommit',
|
||||
'markdown',
|
||||
|
@ -241,8 +252,7 @@ require('mason').setup()
|
|||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua',
|
||||
'typstfmt',
|
||||
'stylua', -- Used to format Lua code
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
|
|
|
@ -13,19 +13,9 @@ return {
|
|||
function()
|
||||
require('Comment.api').toggle.linewise.current()
|
||||
end,
|
||||
mode = { 'n' },
|
||||
mode = { 'n', 'v' },
|
||||
desc = 'Comment toggle current line',
|
||||
},
|
||||
{
|
||||
'<leader>v',
|
||||
function()
|
||||
local esc = vim.api.nvim_replace_termcodes('<ESC>', true, false, true)
|
||||
vim.api.nvim_feedkeys(esc, 'nx', false)
|
||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
||||
end,
|
||||
mode = { 'x' },
|
||||
desc = 'Comment toggle selected lines',
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.keymap.set('n', '<leader>c', function()
|
||||
|
@ -62,34 +52,12 @@ return {
|
|||
{
|
||||
'ziontee113/icon-picker.nvim',
|
||||
keys = {
|
||||
{ '<localleader>fi', '<cmd>IconPickerNormal<CR>', desc = 'pick icon' },
|
||||
{ '<C-I>', '<cmd>IconPickerNormal<CR>', desc = 'pick icon' },
|
||||
{ 'y<C-I>', '<cmd>IconPickerYank<CR>', desc = 'yank icon' },
|
||||
},
|
||||
cmd = { 'IconPickerInsert', 'IconPickerYank', 'IconPickerNormal' },
|
||||
config = function()
|
||||
require('icon-picker').setup { disable_legacy_commands = true }
|
||||
end,
|
||||
},
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
-- Optional dependency
|
||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||
config = function()
|
||||
require('nvim-autopairs').setup {}
|
||||
-- WARN: this is kind of anoying with rust, so I have disabeld it
|
||||
-- -- If you want to automatically add `(` after selecting a function or method
|
||||
-- local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
-- local cmp = require 'cmp'
|
||||
-- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
},
|
||||
{
|
||||
'mbbill/undotree',
|
||||
config = function()
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>u', vim.cmd.UndotreeToggle, { desc = '[U]ndo menu' })
|
||||
vim.g.undotree_WindowLayout = 3
|
||||
vim.g.undotree_SplitWidth = 32
|
||||
vim.g.undotree_DiffAutoOpen = false
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
return {
|
||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
-- NOTE: Plugins can specify dependencies.
|
||||
--
|
||||
-- The dependencies are proper plugin specifications as well - anything
|
||||
|
@ -25,7 +27,7 @@ return {
|
|||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = false, cpp = false, json = true, bib = true }
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||
|
|
|
@ -11,9 +11,9 @@ return {
|
|||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
|
||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- used for completion, annotations and signatures of Neovim apis
|
||||
{ 'folke/lazydev.nvim' },
|
||||
{ 'folke/neodev.nvim', opts = {} },
|
||||
},
|
||||
config = function()
|
||||
require 'custom.plugins.configs.lsp'
|
||||
|
@ -36,19 +36,19 @@ return {
|
|||
'folke/trouble.nvim',
|
||||
cmd = 'Trouble',
|
||||
opts = { use_diagnostic_signs = true },
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ '<leader>ctb', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Document Diagnostics (Trouble)' },
|
||||
{ '<leader>ctr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
||||
{ '<leader>ctq', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
|
||||
{ '<leader>ctl', '<cmd>Trouble loclist toggle<cr>', desc = 'Location List (Trouble)' },
|
||||
{ '<leader>ctd', '<cmd>Trouble symbols<cr>', desc = 'LSP symbols (Trouble)' },
|
||||
{ '<leader>ctt', '<cmd>Trouble todo<cr>', desc = 'Todos (Trouble)' },
|
||||
{ '<leader>cts', '<cmd>Trouble lsp_document_symbols toggle win.position=right<cr>', desc = 'Document [S]ymbols side (Trouble)' },
|
||||
{ '<leader>rb', "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = 'Document Diagnostics (Trouble)' },
|
||||
{ '<leader>rr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
||||
{ '<leader>rq', "<cmd>Trouble qflist toggle<cr>", desc = 'Quickfix List (Trouble)' },
|
||||
{ '<leader>rl', "<cmd>Trouble loclist toggle<cr>", desc = 'Location List (Trouble)' },
|
||||
{ '<leader>rd', "<cmd>Trouble symbols<cr>", desc = 'LSP symbols (Trouble)' },
|
||||
{ '<leader>rt', "<cmd>Trouble todo<cr>", desc = 'Todos (Trouble)' },
|
||||
{
|
||||
'[q',
|
||||
function()
|
||||
if require('trouble').is_open() then
|
||||
require('trouble').previous { skip_groups = true, jump = true }
|
||||
require('trouble').previous({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cprev()
|
||||
end
|
||||
|
@ -59,7 +59,7 @@ return {
|
|||
']q',
|
||||
function()
|
||||
if require('trouble').is_open() then
|
||||
require('trouble').next { skip_groups = true, jump = true }
|
||||
require('trouble').next({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cnext()
|
||||
end
|
||||
|
@ -157,16 +157,16 @@ return {
|
|||
--
|
||||
-- <c-l> will move you to the right of each of the expansion locations.
|
||||
-- <c-h> is similar, except moving you backwards.
|
||||
--['<C-l>'] = cmp.mapping(function()
|
||||
-- if luasnip.expand_or_locally_jumpable() then
|
||||
-- luasnip.expand_or_jump()
|
||||
-- end
|
||||
--end, { 'i', 's' }),
|
||||
--['<C-h>'] = cmp.mapping(function()
|
||||
-- if luasnip.locally_jumpable(-1) then
|
||||
-- luasnip.jump(-1)
|
||||
-- end
|
||||
--end, { 'i', 's' }),
|
||||
['<C-l>'] = cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<C-h>'] = cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||
|
@ -313,6 +313,177 @@ return {
|
|||
},
|
||||
},
|
||||
{ 'kosayoda/nvim-lightbulb', event = { 'BufReadPre', 'BufNewFile' } },
|
||||
{
|
||||
'mfussenegger/nvim-dap',
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
'<leader>db',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
desc = 'Set [D]ebug [B]reakpoint',
|
||||
},
|
||||
{
|
||||
'<leader>dc',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
desc = '[D]ebug [C]ontinue',
|
||||
},
|
||||
{
|
||||
'<leader>ds',
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
desc = 'Set [D]ebug [S]tep over',
|
||||
},
|
||||
{
|
||||
'<leader>di',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
desc = 'Set [D]ebug step [I]nto',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local mason_registry = require 'mason-registry'
|
||||
local codelldb_root = mason_registry.get_package('codelldb'):get_install_path() .. '/extension/'
|
||||
local codelldb_path = codelldb_root .. 'adapter/codelldb'
|
||||
local liblldb_path = codelldb_root .. 'lldb/lib/liblldb.so'
|
||||
dap.defaults.fallback.external_terminal = {
|
||||
command = '/home/plex/.local/bin/kitty',
|
||||
args = {},
|
||||
}
|
||||
dap.adapters.gdb = {
|
||||
type = 'executable',
|
||||
command = 'gdb',
|
||||
args = { '-i', 'dap' },
|
||||
}
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
port = '30333',
|
||||
executable = {
|
||||
command = codelldb_path,
|
||||
args = { '--port', '30333' },
|
||||
detached = false,
|
||||
},
|
||||
}
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = 'Launch file',
|
||||
type = 'codelldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
args = function()
|
||||
return require('custom.utils').tokenize_args(vim.fn.input 'args: ')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
-- FIXME: perhaps we can put the stdio somewhere more practical
|
||||
stopOnEntry = false,
|
||||
},
|
||||
}
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
end,
|
||||
},
|
||||
{
|
||||
'rcarriga/nvim-dap-ui',
|
||||
keys = {
|
||||
{
|
||||
'<leader>du',
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [U]i',
|
||||
},
|
||||
{
|
||||
'<leader>dK',
|
||||
function()
|
||||
require('dap.ui.widgets').hover()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [K] hover',
|
||||
},
|
||||
{
|
||||
'<leader>du',
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [U]i',
|
||||
},
|
||||
{
|
||||
'<leader>dws',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.scopes)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
desc = 'Open [D]ebug [W]indow [S]copes',
|
||||
},
|
||||
{
|
||||
'<leader>dwf',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.frames)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [W]indow [F]rames',
|
||||
},
|
||||
{
|
||||
'<leader>dwi',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.sessions)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
desc = 'Open [D]ebug [W]indow sess[I]ons',
|
||||
},
|
||||
{
|
||||
'<leader>dwt',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.threads)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
desc = 'Open [D]ebug [W]indow [T]hreads',
|
||||
},
|
||||
{
|
||||
'<leader>dwe',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.expression)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [W]indow [E]xpression',
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-dap',
|
||||
'nvim-neotest/nvim-nio',
|
||||
},
|
||||
config = function(_, opts)
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
dapui.setup(opts)
|
||||
dap.listeners.after.event_initialized['dapui_config'] = function()
|
||||
dapui.open {}
|
||||
end
|
||||
dap.listeners.before.event_terminated['dapui_config'] = function()
|
||||
-- dapui.close {}
|
||||
end
|
||||
dap.listeners.before.event_exited['dapui_config'] = function()
|
||||
-- dapui.close {}
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua', -- only load on lua files
|
||||
|
@ -325,4 +496,48 @@ return {
|
|||
},
|
||||
},
|
||||
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
enabled = false,
|
||||
version = '^4', -- Recommended
|
||||
ft = { 'rust' },
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
vim.g.rustaceanvim = {
|
||||
enable_clippy = true,
|
||||
-- Plugin configuration
|
||||
tools = {
|
||||
enable_clippy = true,
|
||||
},
|
||||
-- LSP configuration
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
-- you can also put keymaps in here
|
||||
end,
|
||||
settings = {
|
||||
-- rust-analyzer language server configuration
|
||||
['rust-analyzer'] = {
|
||||
cargo = {
|
||||
features = 'all',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- DAP configuration
|
||||
dap = {
|
||||
-- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the
|
||||
-- opened terminal, effectively rendering debugging with it useless. Luckily,
|
||||
-- we can use the regular nvim-dap and nvim-dap-ui.
|
||||
adapter = dap.adapters.codelldb,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
lazy = false, -- PERF: this can be done more elegant
|
||||
config = function()
|
||||
require('nvim-dap-virtual-text').setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -80,20 +80,20 @@ return {
|
|||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<localleader>fh', builtin.help_tags, { desc = '[H]elp' })
|
||||
vim.keymap.set('n', '<localleader>fk', builtin.keymaps, { desc = '[K]eymaps' })
|
||||
vim.keymap.set('n', '<localleader>ff', builtin.find_files, { desc = '[F]iles' })
|
||||
vim.keymap.set('n', '<localleader>fe', builtin.builtin, { desc = 't[E]lescope' })
|
||||
vim.keymap.set('n', '<localleader>fw', builtin.live_grep, { desc = 'a [W]ord interactively' })
|
||||
vim.keymap.set('n', '<localleader>fcw', builtin.grep_string, { desc = '[C]urrent [W]ord' })
|
||||
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[D]iagnostics' })
|
||||
vim.keymap.set('n', '<localleader>fr', builtin.resume, { desc = '[R]esume' })
|
||||
vim.keymap.set('n', '<localleader>fo', builtin.oldfiles, { desc = '[O]ld Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<localleader>fh', builtin.help_tags, { desc = '[F]ind [H]elp' })
|
||||
vim.keymap.set('n', '<localleader>fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' })
|
||||
vim.keymap.set('n', '<localleader>ff', builtin.find_files, { desc = '[F]ind [F]iles' })
|
||||
vim.keymap.set('n', '<localleader>ft', builtin.builtin, { desc = '[F]ind [T]elescope' })
|
||||
vim.keymap.set('n', '<localleader>fw', builtin.live_grep, { desc = '[F]ind a [W]ord interactively' })
|
||||
vim.keymap.set('n', '<localleader>fcw', builtin.grep_string, { desc = '[F]ind [C]urrent [W]ord' })
|
||||
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' })
|
||||
vim.keymap.set('n', '<localleader>fr', builtin.resume, { desc = '[F]ind [R]esume' })
|
||||
vim.keymap.set('n', '<localleader>fof.', builtin.oldfiles, { desc = '[F]ind [O]ld Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<localleader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<localleader>fb', builtin.buffers, { desc = 'existing [B]uffers' })
|
||||
vim.keymap.set('n', '<localleader>fm', builtin.marks, { desc = 'book[M]arks' })
|
||||
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[D]iagnostigs' })
|
||||
vim.keymap.set('n', '<localleader>fs', builtin.lsp_dynamic_workspace_symbols, { desc = 'LSP [S]ymbols' })
|
||||
vim.keymap.set('n', '<localleader>fb', builtin.buffers, { desc = '[F]ind existing [B]uffers' })
|
||||
vim.keymap.set('n', '<localleader>fm', builtin.marks, { desc = '[F]ind book[M]arks' })
|
||||
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[F]ind LSP [D]iagnostigs' })
|
||||
vim.keymap.set('n', '<localleader>fs', builtin.lsp_dynamic_workspace_symbols, { desc = '[F]ind LSP [S]ymbols' })
|
||||
|
||||
-- spelling
|
||||
vim.keymap.set('n', 'z<space>', builtin.spell_suggest, { desc = '[F]ind spelling' })
|
||||
|
@ -118,7 +118,7 @@ return {
|
|||
end, { desc = '[F]ind [/] in Open Files' })
|
||||
|
||||
-- Shortcut for searching your Neovim configuration files
|
||||
vim.keymap.set('n', '<localleader>fnf', function()
|
||||
vim.keymap.set('n', '<leader>fnf', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[F]ind [N]eovim [F]iles' })
|
||||
end,
|
||||
|
@ -127,7 +127,6 @@ return {
|
|||
'jvgrootveld/telescope-zoxide',
|
||||
dependencies = 'nvim-telescope/telescope.nvim',
|
||||
config = function()
|
||||
vim.keymap.set('n', '<localleader>cd', '<cmd> Telescope zoxide list<cr>', { desc = '[C]hange [D]irectory' })
|
||||
-- Useful for easily creating commands
|
||||
local z_utils = require 'telescope._extensions.zoxide.utils'
|
||||
|
||||
|
@ -135,7 +134,7 @@ return {
|
|||
-- (other Telescope configuration...)
|
||||
extensions = {
|
||||
zoxide = {
|
||||
prompt_title = '[ Recently visited directories (zoxide) ]',
|
||||
prompt_title = '[ Walking on the shoulders of TJ ]',
|
||||
mappings = {
|
||||
default = {
|
||||
after_action = function(selection)
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'zaldih/themery.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
cmd = 'Themery',
|
||||
keys = {
|
||||
{ ';ft', '<cmd> Themery <cr>', desc = '[F]ind [T]heme' },
|
||||
},
|
||||
init = function()
|
||||
require 'settings.theme'
|
||||
end,
|
||||
config = function()
|
||||
require('themery').setup {
|
||||
themes = {
|
||||
-- Dark Themes
|
||||
{
|
||||
name = '==========Dark Themes==========',
|
||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
||||
},
|
||||
{
|
||||
name = 'nvim default',
|
||||
colorscheme = 'default',
|
||||
},
|
||||
{
|
||||
name = 'nvim lunaperche',
|
||||
colorscheme = 'lunaperche',
|
||||
},
|
||||
{
|
||||
name = 'nvim quiet',
|
||||
colorscheme = 'quiet',
|
||||
},
|
||||
{
|
||||
name = 'nvim retrobox',
|
||||
colorscheme = 'retrobox',
|
||||
},
|
||||
{
|
||||
name = 'nvim slate',
|
||||
colorscheme = 'slate',
|
||||
},
|
||||
{
|
||||
name = 'nvim vim',
|
||||
colorscheme = 'vim',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight',
|
||||
colorscheme = 'tokyonight',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-moon',
|
||||
colorscheme = 'tokyonight-moon',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-storm',
|
||||
colorscheme = 'tokyonight-storm',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa',
|
||||
colorscheme = 'kanagawa',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-dragon',
|
||||
colorscheme = 'kanagawa-dragon',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-wave',
|
||||
colorscheme = 'kanagawa-wave',
|
||||
},
|
||||
{
|
||||
name = 'zenbones',
|
||||
colorscheme = 'zenbones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
{
|
||||
name = 'tokyobones',
|
||||
colorscheme = 'tokyobones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
{
|
||||
name = 'kanagawabones',
|
||||
colorscheme = 'kanagawabones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
-- Light themes
|
||||
{
|
||||
name = '==========Light Themes==========',
|
||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-day',
|
||||
colorscheme = 'tokyonight-day',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-lotus',
|
||||
colorscheme = 'kanagawa-lotus',
|
||||
},
|
||||
{
|
||||
name = 'zenbones',
|
||||
colorscheme = 'zenbones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "light"
|
||||
]],
|
||||
},
|
||||
},
|
||||
themeConfigFile = '~/.config/nvim/lua/settings/theme.lua',
|
||||
livePreview = true, -- Apply theme while browsing. Default to true.
|
||||
}
|
||||
end,
|
||||
},
|
||||
'folke/tokyonight.nvim',
|
||||
'rebelot/kanagawa.nvim',
|
||||
{ 'zenbones-theme/zenbones.nvim', dependencies = { 'rktjmp/lush.nvim' } },
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'kdheepak/lazygit.nvim',
|
||||
keys = {
|
||||
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'Open LazyGit' },
|
||||
},
|
||||
cmd = 'LazyGit',
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,19 +1,3 @@
|
|||
local custom_headers = {
|
||||
sharp = {
|
||||
[[ ]],
|
||||
[[ █ ████████ █████ ███████ ████ ]],
|
||||
[[ ███ ██████ █████ █████████ ██████ ]],
|
||||
[[ █████ ██████████████████████ ████ ███████████████ ]],
|
||||
[[ ██ ██ █████ █████████████ ████ ████████████████ ]],
|
||||
[[ ████ ███████████████ █████████ ████ █████ ██████ ████ ]],
|
||||
[[ ██████ ██████ ███ █████████ ████ █████ █████ ████ ]],
|
||||
[[ ████████ ███████████████████ ████ ████ █████ ████ ████ ]],
|
||||
[[ ]],
|
||||
[[ 🛠️ Sharp tools make good work 🖥️ ]],
|
||||
[[ ]],
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
|
@ -100,33 +84,16 @@ return {
|
|||
keys = {
|
||||
{ '<F5>', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
|
||||
{ '<leader>tf', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
|
||||
-- TODO: better map for cd
|
||||
},
|
||||
},
|
||||
{
|
||||
'ggandor/leap.nvim',
|
||||
lazy = false,
|
||||
opts = {},
|
||||
keys = {
|
||||
{ 's', '<plug>(leap-forward)', desc = 'leap forward' },
|
||||
{ 'S', '<plug>(leap-backward)', desc = 'leap backward' },
|
||||
{ 'gs', '<plug>(leap-from-window)', desc = 'leap from window' },
|
||||
},
|
||||
config = function()
|
||||
-- idk why it doesn't work when I just define an opts table, but that is
|
||||
-- so
|
||||
|
||||
local leap = require 'leap'
|
||||
|
||||
leap.opts.safe_labels = 'asfghjkliztrewb'
|
||||
leap.opts.labels = 'sfnjklhodweimbuyvrgtaqpcxz'
|
||||
leap.opts.special_keys = {
|
||||
next_target = '<enter>',
|
||||
prev_target = '<tab>',
|
||||
next_group = '<space>',
|
||||
prev_group = '<tab>',
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
'ggandor/flit.nvim',
|
||||
|
@ -143,10 +110,35 @@ return {
|
|||
}
|
||||
end,
|
||||
},
|
||||
{ 'echasnovski/mini.trailspace', lazy = false, version = false, opts = { only_in_normal_buffers = true } },
|
||||
{
|
||||
'kdheepak/lazygit.nvim',
|
||||
keys = {
|
||||
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'Open LazyGit' },
|
||||
},
|
||||
cmd = 'LazyGit',
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
},
|
||||
{
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
keys = { '<leader>', '<localleader>', '<c-r>', '<c-w>', '"', "'", '`', 'c', 'v', 'g' },
|
||||
defaults = {
|
||||
mode = { 'n', 'v' },
|
||||
[';'] = { name = '+telescope' },
|
||||
[';f'] = { name = '+find' },
|
||||
['g'] = { name = '+goto' },
|
||||
[']'] = { name = '+next' },
|
||||
['['] = { name = '+prev' },
|
||||
['<leader>d'] = { name = '+lsp/debug' },
|
||||
['<leader>r'] = { name = '+diagnostics/quickfix' },
|
||||
['<leader>c'] = { name = '+code' },
|
||||
['<leader>g'] = { name = '+git' },
|
||||
['<leader>t'] = { name = '+toggle/tools' },
|
||||
['<leader>w'] = { name = '+window/which' },
|
||||
['<leader>f'] = { name = '+formatting' },
|
||||
},
|
||||
opts = {
|
||||
triggers_nowait = {
|
||||
-- marks
|
||||
|
@ -169,62 +161,13 @@ return {
|
|||
v = { 'j', 'k' },
|
||||
n = { 'o', 'O' },
|
||||
},
|
||||
-- plugins = {
|
||||
-- marks = true, -- shows a list of your marks on ' and `
|
||||
-- registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
||||
-- -- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
||||
-- -- No actual key bindings are created
|
||||
-- spelling = {
|
||||
-- enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
||||
-- suggestions = 20, -- how many suggestions should be shown in the list?
|
||||
-- },
|
||||
-- presets = {
|
||||
-- operators = true, -- adds help for operators like d, y, ...
|
||||
-- motions = true, -- adds help for motions
|
||||
-- text_objects = true, -- help for text objects triggered after entering an operator
|
||||
-- windows = true, -- default bindings on <c-w>
|
||||
-- nav = true, -- misc bindings to work with windows
|
||||
-- z = true, -- bindings for folds, spelling and others prefixed with z
|
||||
-- g = true, -- bindings for prefixed with g
|
||||
-- },
|
||||
-- },
|
||||
icons = {
|
||||
breadcrumb = '»', -- symbol used in the command line area that shows your active key combo
|
||||
separator = '➜', -- symbol used between a key and it's label
|
||||
group = '+', -- symbol prepended to a group
|
||||
},
|
||||
},
|
||||
config = function(opts)
|
||||
local wk = require 'which-key'
|
||||
local defaults = {
|
||||
mode = { 'n', 'v' },
|
||||
{ '<leader>c', group = '[C]ode/[C]olor' },
|
||||
{ '<leader>ct', group = '[T]rouble' },
|
||||
{ '<leader>d', group = '[D]ebug' },
|
||||
{ '<leader>dc', group = '[C]hange' },
|
||||
{ '<leader>dw', group = '[W]indow' },
|
||||
{ '<leader>f', group = '[F]ormatting' },
|
||||
{ '<leader>g', group = '[G]ood tools' },
|
||||
{ '<leader>r', group = '[R]ename' },
|
||||
{ '<leader>t', group = '[T]oggle' },
|
||||
{ '<leader>w', group = '[W]orkspace' },
|
||||
{ '<leader>wb', group = 'buffer' },
|
||||
{ '<localleader>', group = 'select' },
|
||||
{ '<localleader>f', group = '[F]ind' },
|
||||
{ '[', group = 'prev' },
|
||||
{ ']', group = 'next' },
|
||||
{ 'g', group = 'goto' },
|
||||
}
|
||||
wk.add(defaults, opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
'echasnovski/mini.trailspace',
|
||||
lazy = false,
|
||||
event = { 'BufReadPost', 'BufNewFile' },
|
||||
opts = {
|
||||
only_in_normal_buffers = true,
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'itchyny/vim-cursorword',
|
||||
|
@ -271,20 +214,35 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
{ -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
config = function() -- This is the function that runs, AFTER loading
|
||||
require('which-key').setup()
|
||||
|
||||
-- Document existing key chains
|
||||
require('which-key').register {
|
||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||
['<localleader>f'] = { name = '[F]ind', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||
}
|
||||
-- visual mode
|
||||
require('which-key').register({
|
||||
['<leader>h'] = { 'Git [H]unk' },
|
||||
}, { mode = 'v' })
|
||||
end,
|
||||
},
|
||||
{
|
||||
'RRethy/vim-illuminate',
|
||||
lazy = false,
|
||||
event = { 'BufReadPost', 'BufNewFile' },
|
||||
opts = {
|
||||
-- providers: provider used to get references in the buffer, ordered by priority
|
||||
providers = {
|
||||
'lsp', -- useless for tex but still used
|
||||
'treesitter',
|
||||
'regex',
|
||||
},
|
||||
large_file_cutoff = 50000,
|
||||
delay = 200,
|
||||
under_cursor = true,
|
||||
under_cursor = false,
|
||||
modes_allowlist = { 'n', 'no', 'nt' },
|
||||
filetypes_denylist = {
|
||||
'DiffviewFileHistory',
|
||||
|
@ -294,36 +252,36 @@ return {
|
|||
'git',
|
||||
'minifiles',
|
||||
'neo-tree',
|
||||
'NvimTree_1',
|
||||
'dashboard',
|
||||
},
|
||||
},
|
||||
-- looks weird but is useful: put your cursor on a word and other occurences
|
||||
-- of the word in your buffer will be highlighted. You can then use
|
||||
-- '[[' and ']]' to go to the next or previous occurence.
|
||||
--
|
||||
-- Try it:
|
||||
--
|
||||
-- word #### word ###########
|
||||
-- ############## word ######
|
||||
-- #### word #### word word #
|
||||
--
|
||||
-- (Does only work if the regex source is currently active, otherwise the
|
||||
-- references are those your language server or treesitter gives out, so
|
||||
-- syntax aware)
|
||||
keys = {
|
||||
{ ']]', desc = 'Next Reference' },
|
||||
{ '[[', desc = 'Prev Reference' },
|
||||
},
|
||||
config = function(_, opts)
|
||||
local illuminate = require 'illuminate'
|
||||
illuminate.configure(opts)
|
||||
vim.keymap.set('n', '[[', function()
|
||||
illuminate.goto_prev_reference() -- try putting your cursor on `illuminate`
|
||||
end, { desc = 'Goto last occurence of current word' })
|
||||
vim.keymap.set('n', ']]', function()
|
||||
illuminate.goto_next_reference()
|
||||
end, { desc = 'Goto next occurence of current word' })
|
||||
require('illuminate').configure(opts)
|
||||
|
||||
local function map(key, dir, buffer)
|
||||
vim.keymap.set('n', key, function()
|
||||
require('illuminate')['goto_' .. dir .. '_reference'](false)
|
||||
end, {
|
||||
desc = dir:sub(1, 1):upper() .. dir:sub(2) .. ' Reference',
|
||||
buffer = buffer,
|
||||
})
|
||||
end
|
||||
|
||||
map(']]', 'next')
|
||||
map('[[', 'prev')
|
||||
|
||||
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = vim.api.nvim_create_augroup('plex_illuminate', {}),
|
||||
callback = function()
|
||||
local buffer = vim.api.nvim_get_current_buf()
|
||||
map(']]', 'next', buffer)
|
||||
map('[[', 'prev', buffer)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
@ -334,7 +292,9 @@ return {
|
|||
keys = {
|
||||
{ ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' },
|
||||
{ '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' },
|
||||
{ '<LocalLeader>fdt', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
||||
{ '<LocalLeader>dt', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
||||
{ '<leader>xt', '<cmd>TodoTrouble<CR>', desc = 'Todo (Trouble)' },
|
||||
{ '<leader>xT', '<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>', desc = 'Todo/Fix/Fixme (Trouble)' },
|
||||
},
|
||||
opts = {
|
||||
signs = true,
|
||||
|
@ -349,7 +309,7 @@ return {
|
|||
SECURITY = { icon = ' ', color = 'security' },
|
||||
WARN = { icon = ' ', color = 'warning', alt = { 'WARNING', 'XXX' } },
|
||||
PERF = { icon = ' ', color = 'perf', alt = { 'OPTIM', 'PERFORMANCE', 'OPTIMIZE' } },
|
||||
NOTE = { icon = ' ', color = 'hint', alt = { 'INFO', 'IDEA' } },
|
||||
NOTE = { icon = ' ', color = 'hint', alt = { 'INFO' } },
|
||||
TEST = { icon = '⏲ ', color = 'test', alt = { 'TESTING', 'PASSED', 'FAILED' } },
|
||||
},
|
||||
colors = {
|
||||
|
@ -391,6 +351,23 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
end,
|
||||
},
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
enabled = not vim.g.started_by_firenvim,
|
||||
|
@ -606,101 +583,12 @@ return {
|
|||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'yavorski/lualine-macro-recording.nvim',
|
||||
'NvChad/ui', -- load after nvchad ui
|
||||
},
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'horizon',
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { { 'macro_recording', color = { fg = '#ff9e3b' } }, 'filename', 'locatoin' },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
'akinsho/bufferline.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
{
|
||||
'tiagovla/scope.nvim',
|
||||
config = function()
|
||||
require('scope').setup {}
|
||||
require('telescope').load_extension 'scope'
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.opt.termguicolors = true
|
||||
require('bufferline').setup {}
|
||||
end,
|
||||
},
|
||||
{
|
||||
'MeanderingProgrammer/dashboard.nvim',
|
||||
enable = true,
|
||||
event = 'VimEnter',
|
||||
dependencies = {
|
||||
'MaximilianLloyd/ascii.nvim',
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd({ 'BufWinEnter', 'VimEnter' }, {
|
||||
pattern = { 'dashboard', 'text', 'help', '*' },
|
||||
callback = function()
|
||||
vim.b.minitrailspace_disable = true
|
||||
vim.opt_local.list = false
|
||||
vim.opt_local.colorcolumn = '0'
|
||||
vim.opt_local.spell = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
config = function()
|
||||
-- Do not show trailing space in unmodifiable types
|
||||
require('dashboard').setup {
|
||||
-- Dashboard header
|
||||
header = custom_headers.sharp,
|
||||
-- List of directory paths, or functions that return paths
|
||||
directories = {
|
||||
'~/.config/nvim',
|
||||
'~/Documents/code',
|
||||
'~/Documents/novel',
|
||||
},
|
||||
-- Format to display date in
|
||||
date_format = '%Y-%m-%d %H:%M:%S',
|
||||
-- Sections to add at bottom, these can be string references to
|
||||
-- functions in sections.lua, custom strings, or custom functions
|
||||
footer = {
|
||||
[[ ]],
|
||||
[[ Theme ;ft ]],
|
||||
[[ Git ␣gg ]],
|
||||
[[ Find File ;ff ]],
|
||||
[[ Recent Files ;fo ]],
|
||||
[[ Find Word ;fw ]],
|
||||
[[ Bookmarks ;fm ]],
|
||||
[[ ]],
|
||||
[[ Change Directory ;cd ]],
|
||||
[[ Files F5 ]],
|
||||
[[ Terminal F12 ]],
|
||||
},
|
||||
|
||||
-- Gets called after directory is changed and is provided with the
|
||||
-- directory path as an argument
|
||||
on_load = function(path)
|
||||
-- Do nothing
|
||||
end,
|
||||
-- Highlight groups to use for various components
|
||||
highlight_groups = {
|
||||
header = 'Constant',
|
||||
icon = 'Type',
|
||||
directory = 'Delimiter',
|
||||
hotkey = 'Statement',
|
||||
},
|
||||
}
|
||||
-- TODO: add lsp module for lualine
|
||||
-- Maybe we can steal modules from the nvchad ui
|
||||
require('lualine').setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
{
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Required dependency for nvim-dap-ui
|
||||
'nvim-neotest/nvim-nio',
|
||||
|
@ -21,7 +21,8 @@ return {
|
|||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
|
@ -40,13 +41,19 @@ return {
|
|||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'codelldb',
|
||||
'debugpy',
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
vim.keymap.set('n', '<leader>dB', function() end, { desc = 'Debug: Set Breakpoint' })
|
||||
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
|
||||
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
||||
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
||||
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||
vim.keymap.set('n', '<leader>B', function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end, { desc = 'Debug: Set Breakpoint' })
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
|
@ -70,143 +77,20 @@ return {
|
|||
},
|
||||
}
|
||||
|
||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
end,
|
||||
},
|
||||
{
|
||||
'rcarriga/nvim-dap-ui',
|
||||
keys = {
|
||||
{
|
||||
'<leader>du',
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [U]i',
|
||||
},
|
||||
{
|
||||
'<leader>dso',
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
|
||||
desc = 'Toggle [D]ebug [S]tep [O]ver',
|
||||
},
|
||||
{
|
||||
'<leader>dsi',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
|
||||
desc = 'Toggle [D]ebug [S]tep [I]nto',
|
||||
},
|
||||
{
|
||||
'<leader>dc',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
|
||||
desc = 'Toggle [D]ebug [C]ontinue / Start',
|
||||
},
|
||||
{
|
||||
'<leader>db',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
|
||||
desc = 'Toggle [D]ebug [B]reakpoint',
|
||||
},
|
||||
{
|
||||
'<leader>dB',
|
||||
function()
|
||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end,
|
||||
|
||||
desc = 'Toggle [D]ebug [B]reakpoint condition',
|
||||
},
|
||||
{
|
||||
'<leader>dK',
|
||||
function()
|
||||
require('dap.ui.widgets').hover()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [K] hover',
|
||||
},
|
||||
{
|
||||
'<leader>dws',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.scopes)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
desc = 'Open [D]ebug [W]indow [S]copes',
|
||||
},
|
||||
{
|
||||
'<leader>dwr',
|
||||
function()
|
||||
require('dap').repl.toggle()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [W]indow [R]epl',
|
||||
},
|
||||
{
|
||||
'<leader>dwf',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.frames)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [W]indow [F]rames',
|
||||
},
|
||||
{
|
||||
'<leader>dwi',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.sessions)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
desc = 'Open [D]ebug [W]indow sess[I]ons',
|
||||
},
|
||||
{
|
||||
'<leader>dwt',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.threads)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
desc = 'Open [D]ebug [W]indow [T]hreads',
|
||||
},
|
||||
{
|
||||
'<leader>dwe',
|
||||
function()
|
||||
local widgets = require 'dap.ui.widgets'
|
||||
local my_sidebar = widgets.sidebar(widgets.expression)
|
||||
my_sidebar.open()
|
||||
end,
|
||||
|
||||
desc = 'Open [D]ebug [W]indow [E]xpression',
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-dap',
|
||||
'nvim-neotest/nvim-nio',
|
||||
},
|
||||
config = function(_, opts)
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
dapui.setup(opts)
|
||||
dap.listeners.after.event_initialized['dapui_config'] = function()
|
||||
dapui.open {}
|
||||
end
|
||||
dap.listeners.before.event_terminated['dapui_config'] = function()
|
||||
-- dapui.close {}
|
||||
end
|
||||
dap.listeners.before.event_exited['dapui_config'] = function()
|
||||
-- dapui.close {}
|
||||
end
|
||||
end,
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup {
|
||||
delve = {
|
||||
-- On Windows delve must be run attached or it crashes.
|
||||
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||
detached = vim.fn.has 'win32' == 0,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -4,24 +4,6 @@ return {
|
|||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help ibl`
|
||||
main = 'ibl',
|
||||
opts = {
|
||||
indentLine_enabled = 1,
|
||||
filetype_exclude = {
|
||||
'help',
|
||||
'terminal',
|
||||
'lazy',
|
||||
'lspinfo',
|
||||
'TelescopePrompt',
|
||||
'TelescopeResults',
|
||||
'mason',
|
||||
'dashboard',
|
||||
'',
|
||||
},
|
||||
buftype_exclude = { 'terminal' },
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = false,
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
-- Use `git update-index --assume-unchanged <file>` to ignore changes in this file
|
||||
--
|
||||
-- Themery block
|
||||
-- This block will be replaced by Themery.
|
||||
vim.cmd("colorscheme tokyonight-storm")
|
||||
vim.g.theme_id = 10
|
||||
-- end themery block
|
|
@ -367,95 +367,3 @@ Glänzer
|
|||
postgres
|
||||
sqlite
|
||||
REPL
|
||||
nested19
|
||||
GMs
|
||||
Yusuf
|
||||
nenoECC
|
||||
Nonadekagonic
|
||||
#ediverse
|
||||
fediverse
|
||||
nested19's
|
||||
Navier
|
||||
Poincaré
|
||||
Swinnerton
|
||||
lemmy
|
||||
selfhosting
|
||||
ELO
|
||||
FIDE
|
||||
BDD
|
||||
Pentesting
|
||||
Typst
|
||||
Multivariable
|
||||
envvar
|
||||
Featurefile
|
||||
maschinen
|
||||
menschenlesbar
|
||||
thiserror
|
||||
WSL
|
||||
verbindungen/!
|
||||
acl
|
||||
Metadatum
|
||||
Serve/!
|
||||
Featurefiles
|
||||
#orallem/!
|
||||
#orallem/!
|
||||
newglossaryentry
|
||||
CVE
|
||||
QUIC
|
||||
#orallem/!
|
||||
vorallem/!
|
||||
#roßteile/!
|
||||
großteile/!
|
||||
großteile
|
||||
Konfuguration/!
|
||||
typ
|
||||
Wooly
|
||||
addr
|
||||
adress
|
||||
tokio
|
||||
address/!
|
||||
i32
|
||||
|
||||
C3
|
||||
TOTP
|
||||
Panta/!
|
||||
Panta
|
||||
kauma
|
||||
α
|
||||
XEX
|
||||
unintuitively
|
||||
sea128
|
||||
u8
|
||||
Base64
|
||||
ffield
|
||||
α's
|
||||
Vec
|
||||
u128
|
||||
number1
|
||||
number2
|
||||
i64
|
||||
Waldtraut
|
||||
Kiki
|
||||
Yevda
|
||||
Grischtoffshofen
|
||||
Riedsbach
|
||||
Grischtophus
|
||||
Sichheim
|
||||
Neuhofen
|
||||
Falkenhausen
|
||||
Auenheim
|
||||
KVK
|
||||
#uttslut
|
||||
Kiki's
|
||||
U256
|
||||
Netpulse
|
||||
PID
|
||||
obfuskiert
|
||||
ECB
|
||||
SHA3
|
||||
dnstego
|
||||
obfuskierte
|
||||
DNStego
|
||||
Fauth
|
||||
Lotz
|
||||
deobfuskiert
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue