Merge branch 'master' of https://git.cscherr.de/PlexSheep/neovim-confs
This commit is contained in:
commit
86b1669242
|
@ -8,4 +8,3 @@ after
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
lua/custom/secret
|
lua/custom/secret
|
||||||
lua/custom/configs/secret
|
lua/custom/configs/secret
|
||||||
lua/settings/theme.lua
|
|
||||||
|
|
147
init.lua
147
init.lua
|
@ -1,88 +1,86 @@
|
||||||
local opt = vim.opt
|
vim.g.mapleader = ' '
|
||||||
local g = vim.g
|
vim.g.maplocalleader = ';'
|
||||||
|
vim.g.python3_host_prog = '/usr/bin/python3'
|
||||||
|
|
||||||
g.mapleader = ' '
|
vim.opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
||||||
g.maplocalleader = ';'
|
vim.opt.signcolumn = 'yes'
|
||||||
g.python3_host_prog = '/usr/bin/python3'
|
vim.opt.clipboard = '' -- don't just use the system clipboard
|
||||||
|
vim.opt.wrap = false
|
||||||
opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
vim.opt.breakindent = false
|
||||||
opt.signcolumn = 'yes'
|
vim.opt.spell = false
|
||||||
opt.clipboard = '' -- don't just use the system clipboard
|
vim.opt.conceallevel = 2
|
||||||
opt.wrap = false
|
vim.opt.concealcursor = 'nc'
|
||||||
opt.breakindent = false
|
vim.opt.undofile = true
|
||||||
opt.spell = false
|
vim.opt.undolevels = 10000
|
||||||
opt.conceallevel = 2
|
vim.opt.writebackup = false
|
||||||
opt.undofile = true
|
vim.opt.history = 5000
|
||||||
opt.undolevels = 10000
|
vim.opt.shada = { "'1000", '<50', 's10', 'h' }
|
||||||
opt.writebackup = false
|
vim.g.syntax = true
|
||||||
opt.history = 5000
|
|
||||||
opt.shada = { "'1000", '<50', 's10', 'h' }
|
|
||||||
|
|
||||||
-- Tabs and Indents
|
-- Tabs and Indents
|
||||||
-- ===
|
-- ===
|
||||||
|
vim.opt.textwidth = 80 -- Text width maximum chars before wrapping
|
||||||
opt.textwidth = 80 -- Text width maximum chars before wrapping
|
vim.opt.tabstop = 4 -- The number of spaces a tab is
|
||||||
opt.tabstop = 4 -- The number of spaces a tab is
|
vim.opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
|
||||||
opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
|
vim.opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
|
||||||
opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
|
vim.opt.autoindent = true -- Use same indenting on new lines
|
||||||
opt.autoindent = true -- Use same indenting on new lines
|
vim.opt.smartindent = true -- Smart autoindenting on new lines
|
||||||
opt.smartindent = true -- Smart autoindenting on new lines
|
vim.opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
|
||||||
opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
|
|
||||||
|
|
||||||
-- Timing
|
-- Timing
|
||||||
-- ===
|
-- ===
|
||||||
opt.ttimeout = true
|
vim.opt.ttimeout = true
|
||||||
opt.timeoutlen = 500 -- Time out on mappings
|
vim.opt.timeoutlen = 500 -- Time out on mappings
|
||||||
opt.ttimeoutlen = 10 -- Time out on key codes
|
vim.opt.ttimeoutlen = 10 -- Time out on key codes
|
||||||
opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
|
vim.opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
|
||||||
|
|
||||||
-- Searching
|
-- Searching
|
||||||
-- ===
|
-- ===
|
||||||
opt.ignorecase = true -- Search ignoring case
|
vim.opt.ignorecase = true -- Search ignoring case
|
||||||
opt.smartcase = true -- Keep case when searching with *
|
vim.opt.smartcase = true -- Keep case when searching with *
|
||||||
opt.infercase = true -- Adjust case in insert completion mode
|
vim.opt.infercase = true -- Adjust case in insert completion mode
|
||||||
opt.incsearch = true -- Incremental search
|
vim.opt.incsearch = true -- Incremental search
|
||||||
vim.opt.hlsearch = true -- highlight searched stuff
|
vim.opt.hlsearch = true -- highlight searched stuff
|
||||||
|
|
||||||
-- Formatting
|
-- Formatting
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
opt.wrap = false -- No wrap by default
|
vim.opt.wrap = false -- No wrap by default
|
||||||
opt.linebreak = true -- Break long lines at 'breakat'
|
vim.opt.linebreak = true -- Break long lines at 'breakat'
|
||||||
opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
vim.opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
||||||
opt.startofline = false -- Cursor in same column for few commands
|
vim.opt.startofline = false -- Cursor in same column for few commands
|
||||||
opt.splitbelow = true -- Splits open bottom right
|
vim.opt.splitbelow = true -- Splits open bottom right
|
||||||
opt.splitright = true
|
vim.opt.splitright = true
|
||||||
opt.breakindentopt = { shift = 2, min = 20 }
|
vim.opt.breakindentopt = { shift = 2, min = 20 }
|
||||||
opt.formatoptions = '' -- see :h fo-table & :h formatoptions
|
vim.opt.formatoptions = '' -- see :h fo-table & :h formatoptions
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
|
|
||||||
-- Diff
|
-- Diff
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
|
vim.opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
|
||||||
opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
vim.opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
||||||
|
|
||||||
-- Folds
|
-- Folds
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
opt.foldlevel = 10 -- start with all folds open
|
vim.opt.foldlevel = 10 -- start with all folds open
|
||||||
|
|
||||||
-- Editor UI
|
-- Editor UI
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.o.guifont = 'FiraCode Nerd Font:h15'
|
vim.o.guifont = 'FiraCode Nerd Font:h15'
|
||||||
opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
opt.shortmess = 'xsTOInfFitloCaAs'
|
vim.opt.shortmess = 'xsTOInfFitloCaAs'
|
||||||
opt.showmode = true -- Show mode in cmd window
|
vim.opt.showmode = true -- Show mode in cmd window
|
||||||
opt.scrolloff = 10 -- Keep at least n lines above/below
|
vim.opt.scrolloff = 10 -- Keep at least n lines above/below
|
||||||
opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
vim.opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
||||||
opt.numberwidth = 2 -- Minimum number of columns to use for the line number
|
vim.opt.numberwidth = 2 -- Minimum number of columns to use for the line number
|
||||||
opt.number = true -- Show line numbers
|
vim.opt.number = true -- Show line numbers
|
||||||
opt.relativenumber = true -- Show relative line numbers
|
vim.opt.relativenumber = true -- Show relative line numbers
|
||||||
opt.ruler = true -- Default status ruler
|
vim.opt.ruler = true -- Default status ruler
|
||||||
opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
|
vim.opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
|
||||||
opt.laststatus = 3 -- Always show laststatus
|
vim.opt.laststatus = 3 -- Always show laststatus
|
||||||
|
|
||||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||||
-- See `:help 'list'`
|
-- See `:help 'list'`
|
||||||
|
@ -116,31 +114,31 @@ if vim.g.neovide == true then
|
||||||
vim.g.neovide_fullscreen = true
|
vim.g.neovide_fullscreen = true
|
||||||
end
|
end
|
||||||
|
|
||||||
opt.helpheight = 0 -- Disable help window resizing
|
vim.opt.helpheight = 0 -- Disable help window resizing
|
||||||
opt.winwidth = 30 -- Minimum width for active window
|
vim.opt.winwidth = 30 -- Minimum width for active window
|
||||||
opt.winminwidth = 1 -- Minimum width for inactive windows
|
vim.opt.winminwidth = 1 -- Minimum width for inactive windows
|
||||||
opt.winheight = 1 -- Minimum height for active window
|
vim.opt.winheight = 1 -- Minimum height for active window
|
||||||
opt.winminheight = 1 -- Minimum height for inactive window
|
vim.opt.winminheight = 1 -- Minimum height for inactive window
|
||||||
|
|
||||||
opt.showcmd = false -- show command in status line
|
vim.opt.showcmd = false -- show command in status line
|
||||||
opt.cmdheight = 0
|
vim.opt.cmdheight = 0
|
||||||
opt.cmdwinheight = 5 -- Command-line lines
|
vim.opt.cmdwinheight = 5 -- Command-line lines
|
||||||
opt.equalalways = true -- Resize windows on split or close
|
vim.opt.equalalways = true -- Resize windows on split or close
|
||||||
opt.colorcolumn = '80' -- Column highlight at textwidth's max character-limit
|
vim.opt.colorcolumn = '80' -- Column highlight at textwidth's max character-limit
|
||||||
|
|
||||||
opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
opt.cursorlineopt = { 'number', 'screenline' }
|
vim.opt.cursorlineopt = { 'number', 'screenline' }
|
||||||
|
|
||||||
opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
vim.opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
||||||
opt.pumwidth = 10 -- Minimum width for the popup menu
|
vim.opt.pumwidth = 10 -- Minimum width for the popup menu
|
||||||
opt.pumblend = 10 -- Popup blend
|
vim.opt.pumblend = 10 -- Popup blend
|
||||||
|
|
||||||
-- Spelling correction
|
-- Spelling correction
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
opt.spell = false -- manually enable spell with `set spell` or `<leader>ts`
|
vim.opt.spell = false -- manually enable spell with `set spell` or `<leader>ts`
|
||||||
opt.spelllang = 'en,de_de,'
|
vim.opt.spelllang = 'en,de_de,'
|
||||||
opt.spellsuggest = 'double,50,timeout:5000'
|
vim.opt.spellsuggest = 'double,50,timeout:5000'
|
||||||
|
|
||||||
-- autocommands
|
-- autocommands
|
||||||
-- ===
|
-- ===
|
||||||
|
@ -175,6 +173,7 @@ end ---@diagnostic disable-next-line: undefined-field
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require 'custom.maps'
|
require 'custom.maps'
|
||||||
|
require 'custom.autocmds'
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
local augroup = vim.api.nvim_create_augroup('plex_generic_autocmds', {})
|
||||||
|
|
||||||
|
-- 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',
|
||||||
|
'plaintex',
|
||||||
|
'tex',
|
||||||
|
},
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.conceallevel = 0
|
||||||
|
end,
|
||||||
|
})
|
|
@ -59,10 +59,12 @@ vim.keymap.set({ 'n' }, '#', "'", { desc = '[Q]uit the current window' })
|
||||||
-- split windows
|
-- split windows
|
||||||
vim.keymap.set('n', '<leader>"', '<cmd>vsplit<cr>', { desc = 'Split the window vertically' })
|
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>%', '<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
|
-- window actions
|
||||||
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew [B]uffer' })
|
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 [B]uffer' }) -- :bd would keep in background
|
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-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-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-Left>', '<cmd>vertical resize +1<cr>', { desc = 'Resize window vertically' })
|
||||||
|
@ -75,6 +77,7 @@ vim.keymap.set('n', '<leader>wn', '<cmd>tabnew<cr>', { desc = 'Open a [N]ew [W]o
|
||||||
vim.keymap.set('n', '<leader>wc', '<cmd>tabclose<cr>', { desc = '[C]lose a [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>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>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' })
|
vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true, true, true), { desc = 'Leave terminal mode' })
|
||||||
|
|
||||||
|
@ -85,6 +88,9 @@ 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>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' })
|
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' })
|
vim.keymap.set({ 't', 'n', 'v' }, '<C-S-v>', '<C-w>"+pi', { desc = 'Paste the system clipboard' })
|
||||||
|
|
||||||
-- add lines from normal and visual, without insert mode
|
-- add lines from normal and visual, without insert mode
|
||||||
|
|
|
@ -38,12 +38,12 @@ return {
|
||||||
opts = { use_diagnostic_signs = true },
|
opts = { use_diagnostic_signs = true },
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>rb', "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = 'Document Diagnostics (Trouble)' },
|
{ '<leader>ctb', "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = 'Document Diagnostics (Trouble)' },
|
||||||
{ '<leader>rr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
{ '<leader>ctr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
||||||
{ '<leader>rq', "<cmd>Trouble qflist toggle<cr>", desc = 'Quickfix List (Trouble)' },
|
{ '<leader>ctq', "<cmd>Trouble qflist toggle<cr>", desc = 'Quickfix List (Trouble)' },
|
||||||
{ '<leader>rl', "<cmd>Trouble loclist toggle<cr>", desc = 'Location List (Trouble)' },
|
{ '<leader>ctl', "<cmd>Trouble loclist toggle<cr>", desc = 'Location List (Trouble)' },
|
||||||
{ '<leader>rd', "<cmd>Trouble symbols<cr>", desc = 'LSP symbols (Trouble)' },
|
{ '<leader>ctd', "<cmd>Trouble symbols<cr>", desc = 'LSP symbols (Trouble)' },
|
||||||
{ '<leader>rt', "<cmd>Trouble todo<cr>", desc = 'Todos (Trouble)' },
|
{ '<leader>ctt', "<cmd>Trouble todo<cr>", desc = 'Todos (Trouble)' },
|
||||||
{
|
{
|
||||||
'[q',
|
'[q',
|
||||||
function()
|
function()
|
||||||
|
|
|
@ -92,7 +92,7 @@ return {
|
||||||
vim.keymap.set('n', '<localleader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<localleader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||||
vim.keymap.set('n', '<localleader>fb', builtin.buffers, { desc = '[F]ind existing [B]uffers' })
|
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>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>fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostigs' })
|
||||||
vim.keymap.set('n', '<localleader>fs', builtin.lsp_dynamic_workspace_symbols, { desc = '[F]ind LSP [S]ymbols' })
|
vim.keymap.set('n', '<localleader>fs', builtin.lsp_dynamic_workspace_symbols, { desc = '[F]ind LSP [S]ymbols' })
|
||||||
|
|
||||||
-- spelling
|
-- spelling
|
||||||
|
@ -118,7 +118,7 @@ return {
|
||||||
end, { desc = '[F]ind [/] in Open Files' })
|
end, { desc = '[F]ind [/] in Open Files' })
|
||||||
|
|
||||||
-- Shortcut for searching your Neovim configuration files
|
-- Shortcut for searching your Neovim configuration files
|
||||||
vim.keymap.set('n', '<leader>fnf', function()
|
vim.keymap.set('n', '<localleader>fnf', function()
|
||||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||||
end, { desc = '[F]ind [N]eovim [F]iles' })
|
end, { desc = '[F]ind [N]eovim [F]iles' })
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -65,6 +65,30 @@ return {
|
||||||
name = 'kanagawa-wave',
|
name = 'kanagawa-wave',
|
||||||
colorscheme = '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
|
-- Light themes
|
||||||
{
|
{
|
||||||
name = '==========Light Themes==========',
|
name = '==========Light Themes==========',
|
||||||
|
@ -78,6 +102,14 @@ return {
|
||||||
name = 'kanagawa-lotus',
|
name = 'kanagawa-lotus',
|
||||||
colorscheme = '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',
|
themeConfigFile = '~/.config/nvim/lua/settings/theme.lua',
|
||||||
livePreview = true, -- Apply theme while browsing. Default to true.
|
livePreview = true, -- Apply theme while browsing. Default to true.
|
||||||
|
@ -86,4 +118,5 @@ return {
|
||||||
},
|
},
|
||||||
'folke/tokyonight.nvim',
|
'folke/tokyonight.nvim',
|
||||||
'rebelot/kanagawa.nvim',
|
'rebelot/kanagawa.nvim',
|
||||||
|
{ 'zenbones-theme/zenbones.nvim', dependencies = { 'rktjmp/lush.nvim' } },
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,22 +140,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
keys = { '<leader>', '<localleader>', '<c-r>', '<c-w>', '"', "'", '`', 'c', 'v', 'g' },
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
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 = {
|
opts = {
|
||||||
triggers_nowait = {
|
triggers_nowait = {
|
||||||
-- marks
|
-- marks
|
||||||
|
@ -178,7 +163,49 @@ return {
|
||||||
v = { 'j', 'k' },
|
v = { 'j', 'k' },
|
||||||
n = { 'o', 'O' },
|
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' },
|
||||||
|
['<localleader>'] = { name = '+select', f = { name = '[F]ind' } },
|
||||||
|
['g'] = { name = '+goto' },
|
||||||
|
[']'] = { name = '+next' },
|
||||||
|
['['] = { name = '+prev' },
|
||||||
|
['<leader>d'] = { name = '+[D]ebug', w = { name = '[W]indow' }, c = { name = '[C]hange' } },
|
||||||
|
['<leader>c'] = { name = '+[C]ode/[C]olor', t = { name = '+[T]rouble' } },
|
||||||
|
['<leader>g'] = { name = '+[G]ood tools' },
|
||||||
|
['<leader>f'] = { name = '+[F]ormatting' },
|
||||||
|
['<leader>r'] = { name = '[R]ename' },
|
||||||
|
['<leader>w'] = { name = '[W]orkspace', b = { name = 'buffer' } },
|
||||||
|
['<leader>t'] = { name = '[T]oggle', ['🚫'] = 'which_key_ignore' },
|
||||||
|
}
|
||||||
|
wk.register(defaults, opts)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'echasnovski/mini.trailspace',
|
'echasnovski/mini.trailspace',
|
||||||
|
@ -233,35 +260,20 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
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',
|
'RRethy/vim-illuminate',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
event = { 'BufReadPost', 'BufNewFile' },
|
event = { 'BufReadPost', 'BufNewFile' },
|
||||||
opts = {
|
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,
|
delay = 200,
|
||||||
under_cursor = false,
|
under_cursor = true,
|
||||||
modes_allowlist = { 'n', 'no', 'nt' },
|
modes_allowlist = { 'n', 'no', 'nt' },
|
||||||
filetypes_denylist = {
|
filetypes_denylist = {
|
||||||
'DiffviewFileHistory',
|
'DiffviewFileHistory',
|
||||||
|
@ -271,50 +283,48 @@ return {
|
||||||
'git',
|
'git',
|
||||||
'minifiles',
|
'minifiles',
|
||||||
'neo-tree',
|
'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 = {
|
keys = {
|
||||||
{ ']]', desc = 'Next Reference' },
|
{ ']]', desc = 'Next Reference' },
|
||||||
{ '[[', desc = 'Prev Reference' },
|
{ '[[', desc = 'Prev Reference' },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require('illuminate').configure(opts)
|
local illuminate = require 'illuminate'
|
||||||
|
illuminate.configure(opts)
|
||||||
local function map(key, dir, buffer)
|
vim.keymap.set('n', '[[', function()
|
||||||
vim.keymap.set('n', key, function()
|
illuminate.goto_prev_reference() -- try putting your cursor on `illuminate`
|
||||||
require('illuminate')['goto_' .. dir .. '_reference'](false)
|
end, { desc = 'Goto last occurence of current word' })
|
||||||
end, {
|
vim.keymap.set('n', ']]', function()
|
||||||
desc = dir:sub(1, 1):upper() .. dir:sub(2) .. ' Reference',
|
illuminate.goto_next_reference()
|
||||||
buffer = buffer,
|
end, { desc = 'Goto next occurence of current word' })
|
||||||
})
|
|
||||||
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,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'folke/todo-comments.nvim',
|
'folke/todo-comments.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = 'nvim-telescope/telescope.nvim',
|
dependencies = 'nvim-telescope/telescope.nvim',
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' },
|
{ ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' },
|
||||||
{ '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' },
|
{ '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' },
|
||||||
{ '<LocalLeader>fdt', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
{ '<LocalLeader>fdt', '<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 = {
|
opts = {
|
||||||
signs = true,
|
signs = true,
|
||||||
keywords = {
|
keywords = {
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- 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
|
Loading…
Reference in New Issue