This commit is contained in:
cscherr 2025-08-05 10:22:56 +02:00
parent e3e8915890
commit 98470836af
Signed by: cscherrNT
GPG key ID: 8E2B45BC51A27EA7

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' },
} }