Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
8ca7362bbb | |||
fa36682e11 | |||
b6c6f5008a |
18 changed files with 569 additions and 778 deletions
37
init.lua
37
init.lua
|
@ -1,6 +1,6 @@
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ';'
|
vim.g.maplocalleader = ';'
|
||||||
-- vim.g.python3_host_prog = '/usr/bin/python3'
|
vim.g.python3_host_prog = '/usr/bin/python3'
|
||||||
|
|
||||||
vim.opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
vim.opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.signcolumn = 'yes'
|
||||||
|
@ -15,7 +15,6 @@ vim.opt.writebackup = false
|
||||||
vim.opt.history = 5000
|
vim.opt.history = 5000
|
||||||
vim.opt.shada = { "'1000", '<50', 's10', 'h' }
|
vim.opt.shada = { "'1000", '<50', 's10', 'h' }
|
||||||
vim.g.syntax = true
|
vim.g.syntax = true
|
||||||
vim.o.exrc = true -- load local configs in plugin dir
|
|
||||||
|
|
||||||
-- Tabs and Indents
|
-- Tabs and Indents
|
||||||
-- ===
|
-- ===
|
||||||
|
@ -79,7 +78,7 @@ vim.opt.scrolloff = 6 -- Keep at least n lines above/below
|
||||||
vim.opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
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.numberwidth = 2 -- Minimum number of columns to use for the line number
|
||||||
vim.opt.number = true -- Show line numbers
|
vim.opt.number = true -- Show line numbers
|
||||||
vim.opt.relativenumber = false -- Show relative line numbers
|
vim.opt.relativenumber = true -- Show relative line numbers
|
||||||
vim.opt.ruler = true -- Default status ruler
|
vim.opt.ruler = true -- Default status ruler
|
||||||
vim.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
|
||||||
vim.opt.laststatus = 3 -- Always show laststatus
|
vim.opt.laststatus = 3 -- Always show laststatus
|
||||||
|
@ -142,37 +141,6 @@ vim.opt.spell = true -- manually enable spell with `set spell` or `<leader>ts`
|
||||||
vim.opt.spelllang = 'en,de_de'
|
vim.opt.spelllang = 'en,de_de'
|
||||||
vim.opt.spellsuggest = 'double,50,timeout:5000'
|
vim.opt.spellsuggest = 'double,50,timeout:5000'
|
||||||
|
|
||||||
-- user commands
|
|
||||||
vim.api.nvim_create_user_command('Env', function(opts)
|
|
||||||
vim.cmd(string.format('r!echo $%s', opts.fargs[1]))
|
|
||||||
end, { nargs = 1 })
|
|
||||||
vim.api.nvim_create_user_command('FormatDisable', function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will disable formatting globally
|
|
||||||
print 'disable autoformat globally'
|
|
||||||
vim.g.disable_autoformat = true
|
|
||||||
else
|
|
||||||
print 'disable autoformat locally'
|
|
||||||
vim.b.disable_autoformat = true
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = 'Disable autoformat',
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command('FormatEnable', function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will enable formatting globally
|
|
||||||
print 'enable autoformat globally'
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
else
|
|
||||||
print 'enable autoformat locally'
|
|
||||||
vim.b.disable_autoformat = false
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = 'Enable autoformat',
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- autocommands
|
-- autocommands
|
||||||
-- ===
|
-- ===
|
||||||
local function augroup(name)
|
local function augroup(name)
|
||||||
|
@ -209,7 +177,6 @@ require 'custom.maps'
|
||||||
require 'custom.autocmds'
|
require 'custom.autocmds'
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
{ import = 'kickstart.plugins.debug' },
|
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
@ -15,17 +15,6 @@ vim.api.nvim_create_autocmd('FileType', {
|
||||||
end,
|
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
|
-- always use the tex filetype for latex things, as those are most supported by
|
||||||
-- latex language servers.
|
-- latex language servers.
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
@ -90,3 +79,17 @@ vim.api.nvim_create_autocmd('ColorScheme', {
|
||||||
vim.cmd [[highlight Comment gui=NONE]] -- no italics for comments
|
vim.cmd [[highlight Comment gui=NONE]] -- no italics for comments
|
||||||
end,
|
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,
|
||||||
|
})
|
||||||
|
|
|
@ -29,11 +29,10 @@ 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' })
|
vim.keymap.set({ 'v', 'n' }, 'zj', '<C-y>', { desc = 'move and scroll down' })
|
||||||
|
|
||||||
-- go to beginning and end in insert mode
|
-- 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>', '<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-e>', '<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-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-b>', '<esc>lbi', { desc = 'Go a word backward' })
|
||||||
vim.keymap.set('i', '<C-e>', '<esc>lea', { desc = 'Go a to next word end' })
|
|
||||||
|
|
||||||
-- navigate hjkl in insert mode
|
-- navigate hjkl in insert mode
|
||||||
vim.keymap.set('i', '<C-h>', '<Left>', { desc = 'Move left' })
|
vim.keymap.set('i', '<C-h>', '<Left>', { desc = 'Move left' })
|
||||||
|
@ -54,7 +53,7 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagn
|
||||||
|
|
||||||
-- let me out!!!
|
-- 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' }, 'qqq', '<cmd>bnext<cr><cmd>bd #<cr>', { desc = '[Q]uit the current window' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<A-c>', '<cmd>bnext<cr><cmd>bd #<cr>', { desc = '[C]lose the current buffer' })
|
vim.keymap.set({ 'n', 'v' }, '<A-c>', '<cmd>bnext<cr><cmd>bd #<cr>', { desc = '[Q]uit the current window' })
|
||||||
|
|
||||||
vim.keymap.set({ 'n' }, '#', "'", { desc = '[Q]uit the current window' })
|
vim.keymap.set({ 'n' }, '#', "'", { desc = '[Q]uit the current window' })
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
local completion = require 'null-ls.builtins._meta.completion'
|
|
||||||
-- Brief aside: **What is LSP?**
|
-- Brief aside: **What is LSP?**
|
||||||
--
|
--
|
||||||
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
||||||
|
@ -68,8 +67,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
-- For example, in C this would take you to the header.
|
-- For example, in C this would take you to the header.
|
||||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
|
|
||||||
map('gl', vim.diagnostic.open_float, 'Make the diagnostic big')
|
|
||||||
|
|
||||||
-- The following two autocommands are used to highlight references of the
|
-- The following two autocommands are used to highlight references of the
|
||||||
-- word under your cursor when your cursor rests there for a little while.
|
-- word under your cursor when your cursor rests there for a little while.
|
||||||
-- See `:help CursorHold` for information about when this is executed
|
-- See `:help CursorHold` for information about when this is executed
|
||||||
|
@ -115,27 +112,8 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||||
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||||
CAPABILITIES = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
CAPABILITIES = vim.tbl_deep_extend('force', CAPABILITIES, require('cmp_nvim_lsp').default_capabilities())
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
|
||||||
DEFAULT_ON_ATTACH = function(client, bufnr)
|
|
||||||
vim.keymap.set('n', '<leader>tp', function()
|
|
||||||
print('pinning this file: ', vim.api.nvim_buf_get_name(0), 'bufnr: ', bufnr)
|
|
||||||
client:exec_cmd({
|
|
||||||
title = 'pin',
|
|
||||||
command = 'tinymist.pinMain',
|
|
||||||
arguments = { vim.api.nvim_buf_get_name(0) },
|
|
||||||
}, { bufnr = bufnr })
|
|
||||||
end, { desc = '[T]oggle [P]in (pin this file as main file)', noremap = true })
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>tu', function()
|
|
||||||
client:exec_cmd({
|
|
||||||
title = 'unpin',
|
|
||||||
command = 'tinymist.pinMain',
|
|
||||||
arguments = { vim.v.null },
|
|
||||||
}, { bufnr = bufnr })
|
|
||||||
end, { desc = '[T]oggle [U]npin (unpin this file as main file)', noremap = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
|
@ -147,22 +125,26 @@ end
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
tinymist = {
|
-- clangd = {},
|
||||||
settings = {
|
-- gopls = {},
|
||||||
formatterMode = 'typstyle',
|
-- pyright = {},
|
||||||
exportPdf = 'never',
|
-- rust_analyzer = {},
|
||||||
semanticTokens = 'disable',
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
},
|
--
|
||||||
on_attach = DEFAULT_ON_ATTACH,
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
},
|
-- https://github.com/pmizio/typescript-tools.nvim
|
||||||
|
--
|
||||||
|
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||||
|
-- tsserver = {},
|
||||||
|
--
|
||||||
|
|
||||||
|
tinymist = {},
|
||||||
html = {},
|
html = {},
|
||||||
taplo = {},
|
|
||||||
cssls = {},
|
cssls = {},
|
||||||
ts_ls = {},
|
|
||||||
clangd = {},
|
clangd = {},
|
||||||
pyright = {},
|
|
||||||
bashls = {},
|
bashls = {},
|
||||||
yamlls = {},
|
yamlls = {},
|
||||||
|
texlab = {},
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
settings = {
|
settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
|
@ -170,10 +152,12 @@ local servers = {
|
||||||
command = 'clippy',
|
command = 'clippy',
|
||||||
},
|
},
|
||||||
imports = {
|
imports = {
|
||||||
preferPrelude = true,
|
granularity = {
|
||||||
|
group = 'module',
|
||||||
|
},
|
||||||
|
prefix = 'self',
|
||||||
},
|
},
|
||||||
cargo = {
|
cargo = {
|
||||||
features = 'all',
|
|
||||||
buildScripts = {
|
buildScripts = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
@ -181,12 +165,56 @@ local servers = {
|
||||||
procMacro = {
|
procMacro = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
assist = {
|
|
||||||
emitMustUse = true,
|
|
||||||
expressionFillDefault = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ltex = {
|
||||||
|
use_spellfile = true,
|
||||||
|
autostart = false,
|
||||||
|
filetypes = { 'latex', 'tex', 'markdown', 'typst' },
|
||||||
|
settings = {
|
||||||
|
ltex = {
|
||||||
|
checkFrequency = 'save', -- shut up while i'm just editing, see <https://github.com/folke/noice.nvim/issues/166>
|
||||||
|
-- specific language (such as en-GB or de-DE is recommended, but I
|
||||||
|
-- want multilingual)
|
||||||
|
language = 'auto',
|
||||||
|
enabled = {
|
||||||
|
'bibtex',
|
||||||
|
'tex',
|
||||||
|
'typst',
|
||||||
|
'latex',
|
||||||
|
'gitcommit',
|
||||||
|
'markdown',
|
||||||
|
'org',
|
||||||
|
'restructuredtext',
|
||||||
|
'rsweave',
|
||||||
|
'quarto',
|
||||||
|
'rmd',
|
||||||
|
'context',
|
||||||
|
-- "html",
|
||||||
|
-- "xhtml",
|
||||||
|
},
|
||||||
|
additionalRules = {
|
||||||
|
enablePickyRules = true,
|
||||||
|
-- thats cool, but often adds diagnostics in
|
||||||
|
-- places where a german might confuse words that are similar
|
||||||
|
-- between english and german REGARDLESS of context. I seem to use the
|
||||||
|
-- english words only in the proper contexts, so leaving this on
|
||||||
|
-- just adds annoying hints like 'Hinweis: "list/NN.*" (English) bedeutet "Liste",
|
||||||
|
-- "Verzeichnis" (German). Meinten Sie vielleicht 'cunning', 'trick'?'
|
||||||
|
-- everytime I use the word "list". I liked that this makes the hints be
|
||||||
|
-- in german regardless of the language I'm working in through...
|
||||||
|
--motherTongue = "de",
|
||||||
|
},
|
||||||
|
-- load token and additional languagetool items later
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- languageToolOrg = {
|
||||||
|
-- apiKey = require 'custom.secret.languagetool',
|
||||||
|
-- username = 'accounts@cscherr.de',
|
||||||
|
-- languageToolHttpServerUrl = 'https://api.languagetoolplus.com/v2/',
|
||||||
|
-- },
|
||||||
|
languageToolHttpServerUrl = 'https://api.languagetoolplus.com/v2/',
|
||||||
},
|
},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -210,23 +238,21 @@ require('mason').setup()
|
||||||
-- You can add other tools here that you want Mason to install
|
-- You can add other tools here that you want Mason to install
|
||||||
-- for you, so that they are available from within Neovim.
|
-- for you, so that they are available from within Neovim.
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {})
|
vim.list_extend(ensure_installed, {
|
||||||
|
'stylua',
|
||||||
|
'typstfmt',
|
||||||
|
})
|
||||||
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = ensure_installed,
|
handlers = {
|
||||||
automatic_installation = true,
|
function(server_name)
|
||||||
automatic_enable = false,
|
local server = servers[server_name] or {}
|
||||||
}
|
|
||||||
|
|
||||||
-- some things work weird
|
|
||||||
local lspconfig = require 'lspconfig'
|
|
||||||
|
|
||||||
for server_name, server in pairs(servers) do
|
|
||||||
-- This handles overriding only values explicitly passed
|
-- This handles overriding only values explicitly passed
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, CAPABILITIES, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
require('lspconfig')[server_name].setup(server)
|
require('lspconfig')[server_name].setup(server)
|
||||||
end
|
end,
|
||||||
|
},
|
||||||
lspconfig.gdscript.setup {}
|
}
|
||||||
|
|
|
@ -76,11 +76,10 @@ return {
|
||||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||||
config = function()
|
config = function()
|
||||||
require('nvim-autopairs').setup {}
|
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
|
||||||
-- -- If you want to automatically add `(` after selecting a function or method
|
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||||
-- local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
local cmp = require 'cmp'
|
||||||
-- local cmp = require 'cmp'
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||||
-- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
return {
|
return {
|
||||||
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
-- NOTE: Plugins can specify dependencies.
|
-- NOTE: Plugins can specify dependencies.
|
||||||
--
|
--
|
||||||
-- The dependencies are proper plugin specifications as well - anything
|
-- The dependencies are proper plugin specifications as well - anything
|
||||||
|
@ -22,34 +24,23 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
-- have a well standardized coding style. You can add additional
|
-- have a well standardized coding style. You can add additional
|
||||||
-- languages here or re-enable it for the disabled ones.
|
-- languages here or re-enable it for the disabled ones.
|
||||||
local disable_filetypes = { c = false, cpp = false, json = true, bib = true, markdown = false }
|
local disable_filetypes = { c = false, cpp = false, json = true, bib = true }
|
||||||
return {
|
return {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
['_'] = { 'prettier' },
|
|
||||||
rust = { 'rust-analyzer' },
|
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
typst = { 'typstyle' },
|
|
||||||
json = { 'jq' },
|
|
||||||
-- rust = { 'rustfmt' }, -- does not need one with the lsp there
|
|
||||||
c = { 'clang-format' },
|
|
||||||
cpp = { 'clang-format' },
|
|
||||||
python = { 'autopep8' },
|
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
javascript = { 'prettier' },
|
-- javascript = { { "prettierd", "prettier" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -89,12 +89,12 @@ return {
|
||||||
-- `friendly-snippets` contains a variety of premade snippets.
|
-- `friendly-snippets` contains a variety of premade snippets.
|
||||||
-- See the README about individual language/framework/plugin snippets:
|
-- See the README about individual language/framework/plugin snippets:
|
||||||
-- https://github.com/rafamadriz/friendly-snippets
|
-- https://github.com/rafamadriz/friendly-snippets
|
||||||
{
|
-- {
|
||||||
'rafamadriz/friendly-snippets',
|
-- 'rafamadriz/friendly-snippets',
|
||||||
config = function()
|
-- config = function()
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
@ -313,6 +313,177 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ 'kosayoda/nvim-lightbulb', event = { 'BufReadPre', 'BufNewFile' } },
|
{ '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',
|
'folke/lazydev.nvim',
|
||||||
ft = 'lua', -- only load on lua files
|
ft = 'lua', -- only load on lua files
|
||||||
|
@ -326,25 +497,47 @@ return {
|
||||||
},
|
},
|
||||||
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
|
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
|
||||||
{
|
{
|
||||||
'nvimtools/none-ls.nvim',
|
'mrcjkb/rustaceanvim',
|
||||||
|
enabled = false,
|
||||||
|
version = '^4', -- Recommended
|
||||||
|
ft = { 'rust' },
|
||||||
config = function()
|
config = function()
|
||||||
local null_ls = require 'null-ls'
|
local dap = require 'dap'
|
||||||
|
vim.g.rustaceanvim = {
|
||||||
null_ls.setup {
|
enable_clippy = true,
|
||||||
sources = {
|
-- Plugin configuration
|
||||||
null_ls.builtins.formatting.stylua,
|
tools = {
|
||||||
null_ls.builtins.formatting.gdformat,
|
enable_clippy = true,
|
||||||
null_ls.builtins.diagnostics.gdlint,
|
},
|
||||||
|
-- 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,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'chomosuke/typst-preview.nvim',
|
'theHamsta/nvim-dap-virtual-text',
|
||||||
ft = 'typst',
|
lazy = false, -- PERF: this can be done more elegant
|
||||||
version = '1.*',
|
config = function()
|
||||||
opts = {
|
require('nvim-dap-virtual-text').setup()
|
||||||
dependencies_bin = { ['tinymist'] = 'tinymist' }, -- use mason
|
end,
|
||||||
}, -- lazy.nvim will implicitly calls `setup {}`
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,100 +0,0 @@
|
||||||
local utils = require 'custom.utils'
|
|
||||||
|
|
||||||
local ltex_fts = {
|
|
||||||
'bibtex',
|
|
||||||
'bib',
|
|
||||||
'tex',
|
|
||||||
'typst',
|
|
||||||
'latex',
|
|
||||||
'gitcommit',
|
|
||||||
'markdown',
|
|
||||||
'org',
|
|
||||||
'restructuredtext',
|
|
||||||
'rsweave',
|
|
||||||
'quarto',
|
|
||||||
'rmd',
|
|
||||||
'context',
|
|
||||||
'text',
|
|
||||||
'html',
|
|
||||||
'pandoc',
|
|
||||||
'xhtml',
|
|
||||||
'plaintex',
|
|
||||||
'quarto',
|
|
||||||
'mail',
|
|
||||||
'mdx',
|
|
||||||
'rmd',
|
|
||||||
'rnoweb',
|
|
||||||
'rst',
|
|
||||||
}
|
|
||||||
|
|
||||||
local map = function(keys, func, desc)
|
|
||||||
vim.keymap.set('n', keys, func, { buffer = vim.buf, desc = 'LSP[LTEX]: ' .. desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
LTEX_SETTINGS = {
|
|
||||||
capabilities = CAPABILITIES,
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
DEFAULT_ON_ATTACH(client, bufnr)
|
|
||||||
end,
|
|
||||||
autostart = false,
|
|
||||||
filetypes = ltex_fts,
|
|
||||||
settings = {
|
|
||||||
ltex = {
|
|
||||||
checkFrequency = 'save', -- shut up while i'm just editing, see <https://github.com/folke/noice.nvim/issues/166>
|
|
||||||
-- specific language (such as en-GB or de-DE is recommended, but I
|
|
||||||
-- want multilingual)
|
|
||||||
language = 'auto',
|
|
||||||
enabled = ltex_fts,
|
|
||||||
additionalRules = {
|
|
||||||
enablePickyRules = true,
|
|
||||||
-- thats cool, but often adds diagnostics in
|
|
||||||
-- places where a german might confuse words that are similar
|
|
||||||
-- between english and german REGARDLESS of context. I seem to use the
|
|
||||||
-- english words only in the proper contexts, so leaving this on
|
|
||||||
-- just adds annoying hints like 'Hinweis: "list/NN.*" (English) bedeutet "Liste",
|
|
||||||
-- "Verzeichnis" (German). Meinten Sie vielleicht 'cunning', 'trick'?'
|
|
||||||
-- everytime I use the word "list". I liked that this makes the hints be
|
|
||||||
-- in german regardless of the language I'm working in through...
|
|
||||||
motherTongue = 'de',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- load token and additional languagetool items later if specified
|
|
||||||
local do_not_use_api_key = true
|
|
||||||
local has_api_key, apiKey = utils.try_require 'custom.secret.languagetool'
|
|
||||||
if not do_not_use_api_key and has_api_key and apiKey ~= '' then
|
|
||||||
LTEX_SETTINGS = vim.tbl_deep_extend('keep', LTEX_SETTINGS, {
|
|
||||||
settings = {
|
|
||||||
languageToolOrg = {
|
|
||||||
apiKey = apiKey,
|
|
||||||
username = 'accounts@cscherr.de',
|
|
||||||
},
|
|
||||||
languageToolHttpServerUrl = 'https://api.languagetoolplus.com/',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
else
|
|
||||||
if not do_not_use_api_key then
|
|
||||||
print 'apiKey for ltex/languagetool is not specified'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
'barreiroleo/ltex_extra.nvim',
|
|
||||||
ft = ltex_fts,
|
|
||||||
dependencies = { 'neovim/nvim-lspconfig' },
|
|
||||||
config = function()
|
|
||||||
require('ltex_extra').setup {
|
|
||||||
load_langs = { 'en-US', 'de-DE' },
|
|
||||||
init_check = true,
|
|
||||||
server_opts = LTEX_SETTINGS, -- or use lspconfig regularly
|
|
||||||
}
|
|
||||||
map('<leader>tS', function()
|
|
||||||
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'
|
|
||||||
vim.cmd 'LspStart ltex'
|
|
||||||
end, 'Enable spell checking with languagetool')
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -22,7 +22,6 @@ return {
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
{ 'echasnovski/mini.icons', version = '*' },
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
the_themes = {
|
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
|
-- Dark Themes
|
||||||
{
|
{
|
||||||
name = '==========Dark Themes==========',
|
name = '==========Dark Themes==========',
|
||||||
|
@ -76,12 +89,6 @@ the_themes = {
|
||||||
vim.opt.background = "dark"
|
vim.opt.background = "dark"
|
||||||
]],
|
]],
|
||||||
},
|
},
|
||||||
'catppuccin-frappe',
|
|
||||||
'catppuccin-macchiato',
|
|
||||||
'catppuccin-mocha',
|
|
||||||
'rose-pine-main',
|
|
||||||
'rose-pine-moon',
|
|
||||||
'cyberdream',
|
|
||||||
-- Light themes
|
-- Light themes
|
||||||
{
|
{
|
||||||
name = '==========Light Themes==========',
|
name = '==========Light Themes==========',
|
||||||
|
@ -103,22 +110,8 @@ the_themes = {
|
||||||
vim.opt.background = "light"
|
vim.opt.background = "light"
|
||||||
]],
|
]],
|
||||||
},
|
},
|
||||||
'catppuccin-latte',
|
|
||||||
'rose-pine-dawn',
|
|
||||||
'cyberdream-light',
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
'zaldih/themery.nvim',
|
|
||||||
lazy = false,
|
|
||||||
cmd = 'Themery',
|
|
||||||
keys = {
|
|
||||||
{ ';ft', '<cmd> Themery <cr>', desc = '[F]ind [T]heme' },
|
|
||||||
},
|
},
|
||||||
config = function()
|
themeConfigFile = '~/.config/nvim/lua/settings/theme.lua',
|
||||||
require('themery').setup {
|
|
||||||
themes = the_themes,
|
|
||||||
livePreview = true, -- Apply theme while browsing. Default to true.
|
livePreview = true, -- Apply theme while browsing. Default to true.
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
@ -126,26 +119,4 @@ return {
|
||||||
'folke/tokyonight.nvim',
|
'folke/tokyonight.nvim',
|
||||||
'rebelot/kanagawa.nvim',
|
'rebelot/kanagawa.nvim',
|
||||||
{ 'zenbones-theme/zenbones.nvim', dependencies = { 'rktjmp/lush.nvim' } },
|
{ 'zenbones-theme/zenbones.nvim', dependencies = { 'rktjmp/lush.nvim' } },
|
||||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
|
||||||
{ 'rose-pine/neovim', name = 'rose-pine' },
|
|
||||||
{
|
|
||||||
'scottmckendry/cyberdream.nvim',
|
|
||||||
setup = function()
|
|
||||||
require('cyberdream').setup {
|
|
||||||
-- Enable transparent background
|
|
||||||
transparent = true,
|
|
||||||
italic_comments = false,
|
|
||||||
-- Replace all fillchars with ' ' for the ultimate clean look
|
|
||||||
hide_fillchars = false,
|
|
||||||
borderless_pickers = true,
|
|
||||||
terminal_colors = true,
|
|
||||||
cache = true,
|
|
||||||
extensions = {
|
|
||||||
telescope = true,
|
|
||||||
notify = true,
|
|
||||||
mini = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,8 +118,8 @@ return {
|
||||||
|
|
||||||
local leap = require 'leap'
|
local leap = require 'leap'
|
||||||
|
|
||||||
leap.opts.safe_labels = 'asfghjkliztrewb'
|
leap.opts.safe_labels = 'sfnutSFNLHMUGTZ?'
|
||||||
leap.opts.labels = 'sfnjklhodweimbuyvrgtaqpcxz'
|
leap.opts.labels = 'sfnjklhodweimbuyvrgtaqpcxzSFNJKLHODWEIMBUYVRGTAQPCXZ?'
|
||||||
leap.opts.special_keys = {
|
leap.opts.special_keys = {
|
||||||
next_target = '<enter>',
|
next_target = '<enter>',
|
||||||
prev_target = '<tab>',
|
prev_target = '<tab>',
|
||||||
|
@ -198,24 +198,19 @@ return {
|
||||||
local wk = require 'which-key'
|
local wk = require 'which-key'
|
||||||
local defaults = {
|
local defaults = {
|
||||||
mode = { 'n', 'v' },
|
mode = { 'n', 'v' },
|
||||||
{ '<leader>c', group = '[C]ode/[C]olor' },
|
['<localleader>'] = { name = '+select', f = { name = '[F]ind' } },
|
||||||
{ '<leader>ct', group = '[T]rouble' },
|
['g'] = { name = '+goto' },
|
||||||
{ '<leader>d', group = '[D]ebug' },
|
[']'] = { name = '+next' },
|
||||||
{ '<leader>dc', group = '[C]hange' },
|
['['] = { name = '+prev' },
|
||||||
{ '<leader>dw', group = '[W]indow' },
|
['<leader>d'] = { name = '+[D]ebug', w = { name = '[W]indow' }, c = { name = '[C]hange' } },
|
||||||
{ '<leader>f', group = '[F]ormatting' },
|
['<leader>c'] = { name = '+[C]ode/[C]olor', t = { name = '+[T]rouble' } },
|
||||||
{ '<leader>g', group = '[G]ood tools' },
|
['<leader>g'] = { name = '+[G]ood tools' },
|
||||||
{ '<leader>r', group = '[R]ename' },
|
['<leader>f'] = { name = '+[F]ormatting' },
|
||||||
{ '<leader>t', group = '[T]oggle' },
|
['<leader>r'] = { name = '[R]ename' },
|
||||||
{ '<leader>w', group = '[W]orkspace' },
|
['<leader>w'] = { name = '[W]orkspace', b = { name = 'buffer' } },
|
||||||
{ '<leader>wb', group = 'buffer' },
|
['<leader>t'] = { name = '[T]oggle', ['🚫'] = 'which_key_ignore' },
|
||||||
{ '<localleader>', group = 'select' },
|
|
||||||
{ '<localleader>f', group = '[F]ind' },
|
|
||||||
{ '[', group = 'prev' },
|
|
||||||
{ ']', group = 'next' },
|
|
||||||
{ 'g', group = 'goto' },
|
|
||||||
}
|
}
|
||||||
wk.add(defaults, opts)
|
wk.register(defaults, opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -334,7 +329,7 @@ return {
|
||||||
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>fT', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
{ '<LocalLeader>fdt', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
signs = true,
|
signs = true,
|
||||||
|
@ -588,6 +583,19 @@ return {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'iamcco/markdown-preview.nvim',
|
||||||
|
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||||
|
ft = { 'markdown' },
|
||||||
|
build = function()
|
||||||
|
vim.fn['mkdp#util#install']()
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
-- Ugly fix for wsl not finding my browser
|
||||||
|
-- I HATE windows
|
||||||
|
vim.g.mkdp_echo_preview_url = 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
@ -628,10 +636,8 @@ return {
|
||||||
require('bufferline').setup {}
|
require('bufferline').setup {}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
'sindrets/diffview.nvim',
|
|
||||||
{
|
{
|
||||||
'MeanderingProgrammer/dashboard.nvim',
|
'MeanderingProgrammer/dashboard.nvim',
|
||||||
enable = true,
|
|
||||||
event = 'VimEnter',
|
event = 'VimEnter',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'MaximilianLloyd/ascii.nvim',
|
'MaximilianLloyd/ascii.nvim',
|
||||||
|
@ -642,8 +648,8 @@ return {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.b.minitrailspace_disable = true
|
vim.b.minitrailspace_disable = true
|
||||||
vim.opt_local.list = false
|
vim.opt_local.list = false
|
||||||
vim.opt_local.spell = false
|
|
||||||
vim.opt_local.colorcolumn = '0'
|
vim.opt_local.colorcolumn = '0'
|
||||||
|
vim.opt_local.spell = false
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -16,14 +16,14 @@ M.tokenize_args = function(raw)
|
||||||
--
|
--
|
||||||
-- This means we're better of implementing the lexer with an algorithm.
|
-- This means we're better of implementing the lexer with an algorithm.
|
||||||
local t = {}
|
local t = {}
|
||||||
local current = ''
|
local current = ""
|
||||||
local in_str = false
|
local in_str = false
|
||||||
local str_seek
|
local str_seek
|
||||||
for c in string.gmatch(raw, '.') do -- iterate through all chars
|
for c in string.gmatch(raw, ".") do -- iterate through all chars
|
||||||
if c == ' ' and not in_str then
|
if c == " " and not in_str then
|
||||||
if string.len(current) > 0 then
|
if string.len(current) > 0 then
|
||||||
table.insert(t, current)
|
table.insert(t, current)
|
||||||
current = ''
|
current = ""
|
||||||
end
|
end
|
||||||
elseif c == '"' and not in_str then
|
elseif c == '"' and not in_str then
|
||||||
in_str = true
|
in_str = true
|
||||||
|
@ -34,7 +34,7 @@ M.tokenize_args = function(raw)
|
||||||
elseif c == str_seek and in_str then
|
elseif c == str_seek and in_str then
|
||||||
in_str = false
|
in_str = false
|
||||||
table.insert(t, current)
|
table.insert(t, current)
|
||||||
current = ''
|
current = ""
|
||||||
else
|
else
|
||||||
current = current .. c
|
current = current .. c
|
||||||
end
|
end
|
||||||
|
@ -50,18 +50,18 @@ end
|
||||||
--- @param t any variable
|
--- @param t any variable
|
||||||
--- @return string t_dumped t dumped to string
|
--- @return string t_dumped t dumped to string
|
||||||
M.dump = function(t)
|
M.dump = function(t)
|
||||||
if type(t) == 'table' then
|
if type(t) == "table" then
|
||||||
local s = '{ '
|
local s = "{ "
|
||||||
for k, v in pairs(t) do
|
for k, v in pairs(t) do
|
||||||
if type(k) ~= 'number' then
|
if type(k) ~= "number" then
|
||||||
k = '"' .. k .. '"'
|
k = '"' .. k .. '"'
|
||||||
end
|
end
|
||||||
if k ~= 1 then
|
if k ~= 1 then
|
||||||
s = s .. ', '
|
s = s .. ", "
|
||||||
end
|
end
|
||||||
s = s .. '[' .. k .. "] = '" .. M.dump(v) .. "'\n"
|
s = s .. "[" .. k .. "] = '" .. M.dump(v) .. "'"
|
||||||
end
|
end
|
||||||
return s .. ' }'
|
return s .. " }"
|
||||||
else
|
else
|
||||||
return tostring(t)
|
return tostring(t)
|
||||||
end
|
end
|
||||||
|
@ -81,3 +81,4 @@ M.try_require = function(module)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
-- NOTE: Yes, you can install new plugins here!
|
-- NOTE: Yes, you can install new plugins here!
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
-- NOTE: And you can specify dependencies as well
|
-- NOTE: And you can specify dependencies as well
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Creates a beautiful debugger UI
|
-- Creates a beautiful debugger UI
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
|
||||||
-- Required dependency for nvim-dap-ui
|
-- Required dependency for nvim-dap-ui
|
||||||
'nvim-neotest/nvim-nio',
|
'nvim-neotest/nvim-nio',
|
||||||
|
@ -21,7 +21,8 @@ return {
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
-- Add your own debuggers here
|
||||||
|
'leoluz/nvim-dap-go',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
|
@ -40,13 +41,19 @@ return {
|
||||||
-- online, please don't ask me how to install them :)
|
-- online, please don't ask me how to install them :)
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
-- Update this to ensure that you have the debuggers for the langs you want
|
-- Update this to ensure that you have the debuggers for the langs you want
|
||||||
'codelldb',
|
'delve',
|
||||||
'debugpy',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
-- 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
|
-- Dap UI setup
|
||||||
-- For more information, see |:help nvim-dap-ui|
|
-- 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.after.event_initialized['dapui_config'] = dapui.open
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
dap.listeners.before.event_exited['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',
|
-- 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,
|
||||||
},
|
},
|
||||||
{
|
}
|
||||||
'<leader>dso',
|
|
||||||
function()
|
|
||||||
require('dap').step_over()
|
|
||||||
end,
|
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,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
7
lua/settings/theme.lua
Normal file
7
lua/settings/theme.lua
Normal file
|
@ -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
|
|
@ -1,5 +0,0 @@
|
||||||
gings
|
|
||||||
Safety
|
|
||||||
NewTec
|
|
||||||
Rust
|
|
||||||
Cybersecurity
|
|
Binary file not shown.
|
@ -411,160 +411,10 @@ Konfuguration/!
|
||||||
typ
|
typ
|
||||||
Wooly
|
Wooly
|
||||||
addr
|
addr
|
||||||
#dress
|
adress
|
||||||
tokio
|
tokio
|
||||||
address/!
|
address/!
|
||||||
i32
|
i32
|
||||||
|
|
||||||
C3
|
C3
|
||||||
TOTP
|
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
|
|
||||||
Grischtoff
|
|
||||||
shinobi
|
|
||||||
Grischtoffshofen's
|
|
||||||
Verwahrungskette
|
|
||||||
Räty
|
|
||||||
Aservat/!
|
|
||||||
verfahrensrelevante
|
|
||||||
verfahrensrelevanten
|
|
||||||
Soria
|
|
||||||
#erfahrensrelewand
|
|
||||||
verfahrensrelewand/!
|
|
||||||
#erfahrensrelewant
|
|
||||||
verfahrensrelevant
|
|
||||||
verfahrensrelewant/!
|
|
||||||
gecached
|
|
||||||
Hypervisor
|
|
||||||
Asservats
|
|
||||||
sergej
|
|
||||||
NTLM
|
|
||||||
gecrackt
|
|
||||||
FileZilla
|
|
||||||
EdgeHistory
|
|
||||||
FirefoxWebVisit
|
|
||||||
Artefakttyp
|
|
||||||
HomeUsers
|
|
||||||
hm
|
|
||||||
BossMode
|
|
||||||
Cooldown
|
|
||||||
IRL
|
|
||||||
Einlöser
|
|
||||||
BugStalker
|
|
||||||
libc
|
|
||||||
Coreminer
|
|
||||||
coreminer
|
|
||||||
debuggees
|
|
||||||
steckrs
|
|
||||||
lifecycle
|
|
||||||
Grischtoffshofener
|
|
||||||
Kuppelverteidigungskorps
|
|
||||||
Infrastrukturoffensive
|
|
||||||
l'Avenir
|
|
||||||
Staatsrat's
|
|
||||||
publically
|
|
||||||
Ellinor
|
|
||||||
Thrain
|
|
||||||
Leimann
|
|
||||||
Grischtoff's
|
|
||||||
Farid
|
|
||||||
Nassar
|
|
||||||
Casaus
|
|
||||||
Schutzgardistin
|
|
||||||
Rösch
|
|
||||||
walkable
|
|
||||||
BDSM
|
|
||||||
Herrscher's
|
|
||||||
ŧ
|
|
||||||
GAI
|
|
||||||
Waldtraut's
|
|
||||||
QaaS
|
|
||||||
Brousseau
|
|
||||||
Jérôme
|
|
||||||
Élise
|
|
||||||
Musealisierung
|
|
||||||
Grischtoffshofens
|
|
||||||
Niamh
|
|
||||||
Kuppeldecke
|
|
||||||
Kuppelumgebung
|
|
||||||
QuantumG
|
|
||||||
Molekülmodellierung
|
|
||||||
Stabilitätsfaktor
|
|
||||||
herrscherial
|
|
||||||
decisionmaker
|
|
||||||
reconnections
|
|
||||||
Grischtoffshofian
|
|
||||||
Schutzteinheit
|
|
||||||
Baumaßnahmen
|
|
||||||
Grischtoffshofians
|
|
||||||
GAX
|
|
||||||
MSCI
|
|
||||||
ACWI
|
|
||||||
STMicroelectronics
|
|
||||||
Nucleo
|
|
||||||
STM32
|
|
||||||
ohneweiteres/!
|
|
||||||
STM32CubeIDE
|
|
||||||
vor
|
|
||||||
Möglich/!
|
|
||||||
Systemprogrammiesprachen
|
|
||||||
StableRef
|
|
||||||
StableRefMut
|
|
||||||
IntrusiveList
|
|
||||||
datastructurs
|
|
||||||
mut
|
|
||||||
ptr
|
|
||||||
NonNull
|
|
||||||
vec
|
|
||||||
const
|
|
||||||
adress/!
|
|
||||||
address
|
|
||||||
日本語
|
|
||||||
ICMP
|
|
||||||
IPv4
|
|
||||||
IPv6
|
|
||||||
Cloudflare's
|
|
||||||
SystemD
|
|
||||||
ZSTD
|
|
||||||
netpulsed
|
|
||||||
sudo
|
|
||||||
netpulse
|
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue