Migrated init.lua into plugin files

This commit is contained in:
Zackarias Montell
2025-12-05 09:54:42 +01:00
parent f0493d2fe2
commit 0121d40df5
22 changed files with 1069 additions and 1131 deletions

View File

@@ -0,0 +1,35 @@
-- vim: ts=2 sts=2 sw=2 et
-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
-- NOTE: Disabeling the built in cmp in favor of blink
-- vim.api.nvim_create_autocmd('LspAttach', {
-- callback = function(ev)
-- local client = vim.lsp.get_client_by_id(ev.data.client_id)
-- if client ~= nil and client:supports_method 'textDocument/completion' then
-- vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
-- end
-- end,
-- })
-- Autoindent json by 2 spaces
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'json', 'xml' },
callback = function()
vim.bo.shiftwidth = 2
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.expandtab = true
end,
})