patched autocommand issue, simplifying lsp setup
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
-- lua/autocommands.lua
|
||||
-- Defines autocommands to run on certain events happening
|
||||
-- TODO clean this with functions
|
||||
|
||||
-- [[dynamically change kitty window opacity when opening and closing]]
|
||||
-- [[dynamicallt change kitty window opacity when opening and closing]]
|
||||
-- Define the target opacities
|
||||
local nvim_opacity = "0.85"
|
||||
local default_opacity = "0.6"
|
||||
-- Function to talk to Kitty
|
||||
local function set_kitty_opacity(opacity)
|
||||
-- print("Attempting to set opacity to: " .. opacity)
|
||||
-- Use os.execute to run the kitty remote command
|
||||
os.execute("kitty @ set-background-opacity " .. opacity)
|
||||
end
|
||||
-- Set up the autocommands
|
||||
@@ -27,24 +23,4 @@ vim.api.nvim_create_autocmd("VimLeave", {
|
||||
set_kitty_opacity(default_opacity)
|
||||
end,
|
||||
})
|
||||
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.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Create an augroup to manage our spellcheck autocommands
|
||||
local spell_group = vim.api.nvim_create_augroup("EnableSpellcheck", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = spell_group,
|
||||
-- List the filetypes you want to enable spellcheck for
|
||||
pattern = { "markdown", "text", "gitcommit", "latex", "plaintex" },
|
||||
callback = function()
|
||||
vim.opt_local.spell = true
|
||||
vim.opt_local.spelllang = "en_us" -- Optional: set your preferred language
|
||||
vim.opt_local.spelloptions = "camel"
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user