This commit is contained in:
Christoph J. Scherr 2025-08-13 09:16:42 +02:00
commit 5129a923f0
Signed by: PlexSheep
GPG key ID: 9EB784BB202BB7BB
4 changed files with 454 additions and 442 deletions

View file

@ -84,7 +84,8 @@ vim.keymap.set('n', '<leader>wk', '<cmd>tabnext<cr>', { desc = 'Next [W]orkspace
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('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' })
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Editing -- Editing
@ -133,17 +134,24 @@ vim.keymap.set({ 'v' }, '<leader>fl', ':!fmt -w80<CR>', { desc = '[F]ormat long
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- format the current buffer -- format the current buffer
vim.keymap.set('n', '<leader>ff', function() vim.keymap.set('n', '<leader>ff', function()
require('conform').format() require('conform').format()
end, { desc = '[F]ormat buffer' }) end, { desc = '[F]ormat buffer' })
vim.keymap.set('n', '<leader>fF', function() vim.keymap.set('n', '<leader>fF', function()
vim.lsp.buf.format() vim.lsp.buf.format()
end, { desc = '[F]ormat buffer (no plugin)' }) end, { desc = '[F]ormat buffer (no plugin)' })
vim.keymap.set('n', '<leader>fw', function() vim.keymap.set('n', '<leader>fw', function()
require('mini.trailspace').trim() require('mini.trailspace').trim()
end, { desc = '[F]ormat remove [W]hitespace' }) end, { desc = '[F]ormat remove [W]hitespace' })
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Formating -- Diagnostics
--------------------------------------------------------------------------------
vim.keymap.set({ 'i', 'n', 'v' }, '<S-A-k>', function()
vim.diagnostic.open_float()
end)
--------------------------------------------------------------------------------
-- Ignore
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- discard F15 -- discard F15
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<F15>', '<Nop>') vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<F15>', '<Nop>')

View file

@ -1,103 +1,104 @@
return { return {
-- 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
-- you do for a plugin at the top level, you can do for a dependency. -- you do for a plugin at the top level, you can do for a dependency.
-- --
-- Use the `dependencies` key to specify the dependencies of a particular plugin -- Use the `dependencies` key to specify the dependencies of a particular plugin
{ -- Autoformat { -- Autoformat
'stevearc/conform.nvim', 'stevearc/conform.nvim',
lazy = false, lazy = false,
keys = { keys = {
{ {
'<leader>f', '<leader>f',
function() function()
require('conform').format { async = true, lsp_fallback = true } require('conform').format { async = true, lsp_fallback = true }
end, end,
mode = '', mode = '',
desc = '[F]ormat buffer', desc = '[F]ormat buffer',
}, },
}, },
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 if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return return
end 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, markdown = false }
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' }, ['_'] = { 'prettier' },
rust = { 'rust-analyzer' }, rust = { 'rust-analyzer' },
lua = { 'stylua' }, lua = { 'stylua' },
typst = { 'typstyle' }, typst = { 'typstyle' },
json = { 'jq' }, json = { 'jq' },
-- rust = { 'rustfmt' }, -- does not need one with the lsp there -- rust = { 'rustfmt' }, -- does not need one with the lsp there
c = { 'clang-format' }, c = { 'clang-format' },
cpp = { 'clang-format' }, cpp = { 'clang-format' },
python = { 'autopep8' }, 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 = { 'prettier' },
}, asm = { "asmfmt" }
}, },
}, },
{ },
'glacambre/firenvim', {
enabled = vim.g.started_by_firenvim, 'glacambre/firenvim',
lazy = false, enabled = vim.g.started_by_firenvim,
build = function() lazy = false,
vim.fn['firenvim#install'](0) build = function()
end, vim.fn['firenvim#install'](0)
config = function() end,
vim.g.firenvim_config = { config = function()
localSettings = { vim.g.firenvim_config = {
['.*'] = { localSettings = {
filename = '/tmp/{hostname}_{pathname%10}.{extension%5}', ['.*'] = {
cmdline = 'firenvim', filename = '/tmp/{hostname}_{pathname%10}.{extension%5}',
takeover = 'never', -- can't open it with never at all? cmdline = 'firenvim',
}, takeover = 'never', -- can't open it with never at all?
}, },
} },
end, }
}, end,
{ },
-- enables UNIX specific stuff in vim, {
-- specifically: -- enables UNIX specific stuff in vim,
-- :SudoWrite -- specifically:
-- :SudoRead -- :SudoWrite
-- :Chmod -- :SudoRead
-- and also some more, but those are easy done with shell -- :Chmod
'tpope/vim-eunuch', -- and also some more, but those are easy done with shell
lazy = false, 'tpope/vim-eunuch',
}, lazy = false,
{ },
'mikesmithgh/kitty-scrollback.nvim', {
enabled = true, 'mikesmithgh/kitty-scrollback.nvim',
lazy = true, enabled = true,
cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth' }, lazy = true,
event = { 'User KittyScrollbackLaunch' }, cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth' },
-- version = '*', -- latest stable version, may have breaking changes if major version changed event = { 'User KittyScrollbackLaunch' },
-- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes -- version = '*', -- latest stable version, may have breaking changes if major version changed
config = function() -- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes
require('kitty-scrollback').setup { config = function()
myconfig = function() require('kitty-scrollback').setup {
return { keymaps_enabled = false } myconfig = function()
end, return { keymaps_enabled = false }
} end,
end, }
}, end,
},
{ import = 'custom.plugins' }, { import = 'custom.plugins' },
} }

View file

@ -1,359 +1,350 @@
return { return {
{ {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim -- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim', 'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP. -- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} }, { 'j-hui/fidget.nvim', opts = {} },
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis -- used for completion, annotations and signatures of Neovim apis
{ 'folke/lazydev.nvim' }, { 'folke/lazydev.nvim' },
}, },
config = function() config = function()
require 'custom.plugins.configs.lsp' require 'custom.plugins.configs.lsp'
end, end,
}, },
-- See `:help gitsigns` to understand what the configuration keys do -- See `:help gitsigns` to understand what the configuration keys do
{ -- Adds git related signs to the gutter, as well as utilities for managing changes { -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
opts = { opts = {
signs = { signs = {
add = { text = '+' }, add = { text = '+' },
change = { text = '~' }, change = { text = '~' },
delete = { text = '_' }, delete = { text = '_' },
topdelete = { text = '' }, topdelete = { text = '' },
changedelete = { text = '~' }, changedelete = { text = '~' },
}, },
}, },
}, },
{ {
'folke/trouble.nvim', 'folke/trouble.nvim',
cmd = 'Trouble', cmd = 'Trouble',
opts = { use_diagnostic_signs = true }, opts = { use_diagnostic_signs = true },
keys = { keys = {
{ '<leader>ctb', '<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>ctr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace 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>ctq', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
{ '<leader>ctl', '<cmd>Trouble loclist toggle<cr>', desc = 'Location List (Trouble)' }, { '<leader>ctl', '<cmd>Trouble loclist toggle<cr>', desc = 'Location List (Trouble)' },
{ '<leader>ctd', '<cmd>Trouble symbols<cr>', desc = 'LSP symbols (Trouble)' }, { '<leader>ctd', '<cmd>Trouble symbols<cr>', desc = 'LSP symbols (Trouble)' },
{ '<leader>ctt', '<cmd>Trouble todo<cr>', desc = 'Todos (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>cts', '<cmd>Trouble lsp_document_symbols toggle win.position=right<cr>', desc = 'Document [S]ymbols side (Trouble)' },
{ {
'[q', '[q',
function() function()
if require('trouble').is_open() then if require('trouble').is_open() then
require('trouble').previous { skip_groups = true, jump = true } require('trouble').previous { skip_groups = true, jump = true }
else else
vim.cmd.cprev() vim.cmd.cprev()
end end
end, end,
desc = 'Previous trouble/quickfix item', desc = 'Previous trouble/quickfix item',
}, },
{ {
']q', ']q',
function() function()
if require('trouble').is_open() then if require('trouble').is_open() then
require('trouble').next { skip_groups = true, jump = true } require('trouble').next { skip_groups = true, jump = true }
else else
vim.cmd.cnext() vim.cmd.cnext()
end end
end, end,
desc = 'Next trouble/quickfix item', desc = 'Next trouble/quickfix item',
}, },
}, },
}, },
{ -- Autocompletion { -- Autocompletion
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
enabled = not vim.g.started_by_firenvim, enabled = not vim.g.started_by_firenvim,
event = 'InsertEnter', event = 'InsertEnter',
dependencies = { dependencies = {
-- Snippet Engine & its associated nvim-cmp source -- Snippet Engine & its associated nvim-cmp source
{ {
'L3MON4D3/LuaSnip', 'L3MON4D3/LuaSnip',
build = (function() build = (function()
-- Build Step is needed for regex support in snippets. -- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments. -- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows. -- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return return
end end
return 'make install_jsregexp' return 'make install_jsregexp'
end)(), end)(),
dependencies = { dependencies = {
-- `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',
-- Adds other completion capabilities. -- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split -- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes. -- into multiple repos for maintenance purposes.
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
}, },
config = function() config = function()
-- See `:help cmp` -- See `:help cmp`
local cmp = require 'cmp' local cmp = require 'cmp'
local luasnip = require 'luasnip' local luasnip = require 'luasnip'
luasnip.config.setup {} luasnip.config.setup {}
cmp.setup { cmp.setup {
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
end, end,
}, },
completion = { completeopt = 'menu,menuone,noinsert' }, completion = { completeopt = 'menu,menuone,noinsert' },
-- For an understanding of why these mappings were -- For an understanding of why these mappings were
-- chosen, you will need to read `:help ins-completion` -- chosen, you will need to read `:help ins-completion`
-- --
-- No, but seriously. Please read `:help ins-completion`, it is really good! -- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert { mapping = cmp.mapping.preset.insert {
-- Select the [n]ext item -- Select the [n]ext item
['<C-n>'] = cmp.mapping.select_next_item(), ['<C-n>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item -- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(), ['<C-p>'] = cmp.mapping.select_prev_item(),
-- Scroll the documentation window [b]ack / [f]orward -- Scroll the documentation window [b]ack / [f]orward
['<C-b>'] = cmp.mapping.scroll_docs(-4), ['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
-- Accept ([y]es) the completion. -- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it. -- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet. -- This will expand snippets if the LSP sent a snippet.
-- ['<C-y>'] = cmp.mapping.confirm { select = true }, -- ['<C-y>'] = cmp.mapping.confirm { select = true },
-- If you prefer more traditional completion keymaps, -- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines -- you can uncomment the following lines
['<CR>'] = cmp.mapping.confirm { select = true }, ['<CR>'] = cmp.mapping.confirm { select = true },
['<Tab>'] = cmp.mapping.select_next_item(), ['<Tab>'] = cmp.mapping.select_next_item(),
['<S-Tab>'] = cmp.mapping.select_prev_item(), ['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- Manually trigger a completion from nvim-cmp. -- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display -- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available. -- completions whenever it has completion options available.
['<C-Space>'] = cmp.mapping.complete {}, ['<C-Space>'] = cmp.mapping.complete {},
-- Think of <c-l> as moving to the right of your snippet expansion. -- Think of <c-l> as moving to the right of your snippet expansion.
-- So if you have a snippet that's like: -- So if you have a snippet that's like:
-- function $name($args) -- function $name($args)
-- $body -- $body
-- end -- end
-- --
-- <c-l> will move you to the right of each of the expansion locations. -- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards. -- <c-h> is similar, except moving you backwards.
--['<C-l>'] = cmp.mapping(function() --['<C-l>'] = cmp.mapping(function()
-- if luasnip.expand_or_locally_jumpable() then -- if luasnip.expand_or_locally_jumpable() then
-- luasnip.expand_or_jump() -- luasnip.expand_or_jump()
-- end -- end
--end, { 'i', 's' }), --end, { 'i', 's' }),
--['<C-h>'] = cmp.mapping(function() --['<C-h>'] = cmp.mapping(function()
-- if luasnip.locally_jumpable(-1) then -- if luasnip.locally_jumpable(-1) then
-- luasnip.jump(-1) -- luasnip.jump(-1)
-- end -- end
--end, { 'i', 's' }), --end, { 'i', 's' }),
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
}, },
sources = { sources = {
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'path' }, { name = 'path' },
}, },
} }
end, end,
}, },
{ -- Highlight, edit, and navigate code { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate', build = ':TSUpdate',
opts = { opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,
highlight = { highlight = {
enable = true, enable = true,
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to -- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent. -- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { 'ruby' }, additional_vim_regex_highlighting = { 'ruby' },
}, },
indent = { enable = true, disable = { 'ruby' } }, indent = { enable = true, disable = { 'ruby' } },
}, },
config = function(_, opts) config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
-- Prefer git instead of curl in order to improve connectivity in some environments -- Prefer git instead of curl in order to improve connectivity in some environments
require('nvim-treesitter.install').prefer_git = true require('nvim-treesitter.install').prefer_git = true
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts) require('nvim-treesitter.configs').setup(opts)
-- There are additional nvim-treesitter modules that you can use to interact -- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you: -- with nvim-treesitter. You should go explore a few and see what interests you:
-- --
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end, end,
}, },
{ {
'kevinhwang91/nvim-bqf', 'kevinhwang91/nvim-bqf',
ft = 'qf', ft = 'qf',
cmd = 'BqfAutoToggle', cmd = 'BqfAutoToggle',
event = 'QuickFixCmdPost', event = 'QuickFixCmdPost',
opts = { opts = {
auto_resize_height = false, auto_resize_height = false,
func_map = { func_map = {
tab = 'st', tab = 'st',
split = 'sv', split = 'sv',
vsplit = 'sg', vsplit = 'sg',
stoggleup = 'K', stoggleup = 'K',
stoggledown = 'J', stoggledown = 'J',
stogglevm = '<Space>', stogglevm = '<Space>',
ptoggleitem = 'p', ptoggleitem = 'p',
ptoggleauto = 'P', ptoggleauto = 'P',
ptogglemode = 'zp', ptogglemode = 'zp',
pscrollup = '<C-b>', pscrollup = '<C-b>',
pscrolldown = '<C-f>', pscrolldown = '<C-f>',
prevfile = 'gk', prevfile = 'gk',
nextfile = 'gj', nextfile = 'gj',
prevhist = '<S-Tab>', prevhist = '<S-Tab>',
nexthist = '<Tab>', nexthist = '<Tab>',
}, },
preview = { preview = {
auto_preview = true, auto_preview = true,
should_preview_cb = function(bufnr) should_preview_cb = function(bufnr)
-- file size greater than 100kb can't be previewed automatically -- file size greater than 100kb can't be previewed automatically
local filename = vim.api.nvim_buf_get_name(bufnr) local filename = vim.api.nvim_buf_get_name(bufnr)
local fsize = vim.fn.getfsize(filename) local fsize = vim.fn.getfsize(filename)
if fsize > 100 * 1024 then if fsize > 100 * 1024 then
return false return false
end end
return true return true
end, end,
}, },
}, },
}, },
{ {
'rmagatti/goto-preview', 'rmagatti/goto-preview',
event = 'FileType', event = 'FileType',
keys = { keys = {
{ {
'gpd', 'gpd',
function() function()
require('goto-preview').goto_preview_definition() require('goto-preview').goto_preview_definition()
end, end,
desc = 'Go to definition preview', desc = 'Go to definition preview',
}, },
{ {
'gpD', 'gpD',
function() function()
require('goto-preview').goto_preview_declaration() require('goto-preview').goto_preview_declaration()
end, end,
desc = 'Go to declaration preview', desc = 'Go to declaration preview',
}, },
{ {
'gpi', 'gpi',
function() function()
require('goto-preview').goto_preview_implementation() require('goto-preview').goto_preview_implementation()
end, end,
desc = 'Go to implementaion preview', desc = 'Go to implementaion preview',
}, },
{ {
'gpt', 'gpt',
function() function()
require('goto-preview').goto_preview_type_definition() require('goto-preview').goto_preview_type_definition()
end, end,
desc = 'Go to type preview', desc = 'Go to type preview',
}, },
{ {
'gpt', 'gpt',
function() function()
require('goto-preview').goto_preview_type_references() require('goto-preview').goto_preview_type_references()
end, end,
desc = 'Preview references', desc = 'Preview references',
}, },
{ {
'gpc', 'gpc',
function() function()
require('goto-preview').close_all_win() require('goto-preview').close_all_win()
end, end,
desc = 'Close all preview windows', desc = 'Close all preview windows',
}, },
}, },
config = function() config = function()
require('goto-preview').setup {} require('goto-preview').setup {}
end, end,
dependencies = 'nvim-telescope/telescope.nvim', dependencies = 'nvim-telescope/telescope.nvim',
opts = { opts = {
width = 78, width = 78,
height = 15, height = 15,
default_mappings = false, default_mappings = false,
opacity = 10, opacity = 10,
}, },
}, },
{ 'kosayoda/nvim-lightbulb', event = { 'BufReadPre', 'BufNewFile' } }, { 'kosayoda/nvim-lightbulb', event = { 'BufReadPre', 'BufNewFile' } },
{ {
'folke/lazydev.nvim', 'folke/lazydev.nvim',
ft = 'lua', -- only load on lua files ft = 'lua', -- only load on lua files
opts = { opts = {
library = { library = {
-- See the configuration section for more details -- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found -- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } }, { path = 'luvit-meta/library', words = { 'vim%.uv' } },
}, },
}, },
}, },
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings { 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
{ {
'nvimtools/none-ls.nvim', 'nvimtools/none-ls.nvim',
config = function() config = function()
local null_ls = require 'null-ls' local null_ls = require 'null-ls'
null_ls.setup { null_ls.setup {
sources = { sources = {
null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.gdformat, null_ls.builtins.formatting.gdformat,
null_ls.builtins.diagnostics.gdlint, null_ls.builtins.diagnostics.gdlint,
}, },
} }
end, end,
}, },
{ {
'chomosuke/typst-preview.nvim', 'chomosuke/typst-preview.nvim',
ft = 'typst', ft = 'typst',
version = '1.*', version = '1.*',
opts = { opts = {
dependencies_bin = { ['tinymist'] = 'tinymist' }, -- use mason dependencies_bin = { ['tinymist'] = 'tinymist' }, -- use mason
}, -- lazy.nvim will implicitly calls `setup {}` }, -- lazy.nvim will implicitly calls `setup {}`
}, },
{
'hedyhli/outline.nvim',
lazy = true,
cmd = { 'Outline', 'OutlineOpen' },
keys = { -- Example mapping to toggle outline
{ '<leader>to', '<cmd>Outline<CR>', desc = 'Toggle outline' },
},
opts = {},
},
} }

View file

@ -631,3 +631,15 @@ Mitgliedern
Immunitätsrecht Immunitätsrecht
GN GN
Normebene Normebene
ALgorithmus
implementation/!
Implementation
datentypen/!
Datentypen
Toolchain
Ceedling
tests/!
Tests
Unit
Unity
Build