dotfiles/.config/nvim/lua/my/plugins/plugins.lua
tea d575feaa75
nvim: start rewriting config
- switch to lazy
- rip out obsolete stuff
- hopefully better organization
2024-08-18 14:17:27 +02:00

100 lines
3.0 KiB
Lua

local function has_api_level(desired)
return vim.version().api_level >= desired
end
return {
-- common dependencies
{ 'https://github.com/nvim-lua/plenary.nvim',
lazy = true
},
-- basics
{ 'https://github.com/owozsh/amora',
init = function()
vim.o.termguicolors = true -- 24 bit colors
end,
config = function()
vim.cmd('colorscheme amora')
-- make comments a bit lighter
vim.api.nvim_set_hl(0, 'AmoraComment', { fg = '#7C4180', ctermfg = 61 })
vim.api.nvim_set_hl(0, 'AmoraCommentBold',
{ fg = '#7C4180', ctermfg = 61, bold = true })
end,
},
{ 'https://github.com/editorconfig/editorconfig-vim',
-- 0.9.0 has EditorConfig support included
enabled = not has_api_level(11)
},
{ 'https://github.com/ii14/autosplit.nvim',
init = function()
-- split these vertically if there is enough space
vim.g.autosplit_bt = { 'help', 'terminal' }
vim.g.autosplit_ft = {
'man', 'fugitive', 'gitcommit', 'gitrebase', 'git'
}
end,
},
-- filetypes
{ 'https://github.com/nvim-treesitter/nvim-treesitter',
version = '*',
build = [[:TSUpdateSync]],
opts = {
ensure_installed = 'all',
ignore_install = { 'comment', 'help' },
sync_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'cpp' }
}
},
},
{ 'https://github.com/JoosepAlviste/nvim-ts-context-commentstring',
dependencies = 'nvim-treesitter',
enabled = has_api_level(11),
opts = {
enable = true,
enable_autocmd = false
},
init = function()
vim.g.skip_ts_context_commentstring_module = true
end,
},
{ 'https://github.com/folke/todo-comments.nvim',
version = '*',
dependencies = { 'plenary.nvim' },
enabled = has_api_level(11),
opts = {
signs = false,
highlight = {
keyword = 'bg',
after = ''
}
},
init = function()
vim.g.vimtex_compiler_latexmk_engines = { _ = '-xelatex' }
end,
},
{ 'https://github.com/powerman/vim-plugin-AnsiEsc' },
{ 'https://github.com/lervag/vimtex',
version = '*',
enabled = has_api_level(11) and vim.fn.executable('xelatex') == 1
},
{ 'https://github.com/NvChad/nvim-colorizer.lua',
opts = {
filetypes = { '*' },
user_default_options = {
mode = 'virtualtext',
rgb_fn = true,
hsl_fn = true,
RRGGBBAA = true,
}
},
},
{ 'https://github.com/gennaro-tedesco/nvim-jqx',
version = '*',
ft = { "json", "yaml" },
},
{ 'https://github.com/isobit/vim-caddyfile' },
}