neovim-confs/lua/custom/plugins/init.lua

93 lines
2.7 KiB
Lua
Raw Normal View History

2024-07-04 12:09:09 +02:00
return {
2024-07-04 11:26:39 +02:00
-- NOTE: Plugins can specify dependencies.
--
-- The dependencies are proper plugin specifications as well - anything
-- 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
{ -- Autoformat
'stevearc/conform.nvim',
lazy = false,
keys = {
{
'<leader>f',
function()
require('conform').format { async = true, lsp_fallback = true }
end,
mode = '',
desc = '[F]ormat buffer',
},
},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
2024-08-19 16:24:58 +02:00
local disable_filetypes = { c = false, cpp = false, json = true, bib = true }
2024-07-04 11:26:39 +02:00
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
}
end,
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
},
},
},
2024-07-04 15:24:34 +02:00
{
'glacambre/firenvim',
enabled = vim.g.started_by_firenvim,
lazy = false,
build = function()
vim.fn['firenvim#install'](0)
end,
2024-07-04 11:26:39 +02:00
config = function()
2024-07-04 15:24:34 +02:00
vim.g.firenvim_config = {
localSettings = {
['.*'] = {
filename = '/tmp/{hostname}_{pathname%10}.{extension%5}',
cmdline = 'firenvim',
takeover = 'never', -- can't open it with never at all?
},
2024-07-04 11:26:39 +02:00
},
}
end,
},
2024-07-04 15:24:34 +02:00
{
-- enables UNIX specific stuff in vim,
-- specifically:
-- :SudoWrite
-- :SudoRead
-- :Chmod
-- and also some more, but those are easy done with shell
'tpope/vim-eunuch',
lazy = false,
2024-07-04 11:26:39 +02:00
},
2024-07-04 15:24:34 +02:00
{
'mikesmithgh/kitty-scrollback.nvim',
enabled = true,
lazy = true,
cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth' },
event = { 'User KittyScrollbackLaunch' },
-- version = '*', -- latest stable version, may have breaking changes if major version changed
-- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes
2024-07-04 11:26:39 +02:00
config = function()
2024-07-04 15:24:34 +02:00
require('kitty-scrollback').setup {
myconfig = function()
return { keymaps_enabled = false }
end,
}
2024-07-04 11:26:39 +02:00
end,
},
2024-07-04 12:09:09 +02:00
{ import = 'custom.plugins' },
}