patched autocommand issue, simplifying lsp setup
This commit is contained in:
@@ -1,14 +1,10 @@
|
|||||||
-- lua/autocommands.lua
|
-- [[dynamicallt change kitty window opacity when opening and closing]]
|
||||||
-- Defines autocommands to run on certain events happening
|
|
||||||
-- TODO clean this with functions
|
|
||||||
|
|
||||||
-- [[dynamically change kitty window opacity when opening and closing]]
|
|
||||||
-- Define the target opacities
|
-- Define the target opacities
|
||||||
local nvim_opacity = "0.85"
|
local nvim_opacity = "0.85"
|
||||||
local default_opacity = "0.6"
|
local default_opacity = "0.6"
|
||||||
-- Function to talk to Kitty
|
-- Function to talk to Kitty
|
||||||
local function set_kitty_opacity(opacity)
|
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)
|
os.execute("kitty @ set-background-opacity " .. opacity)
|
||||||
end
|
end
|
||||||
-- Set up the autocommands
|
-- Set up the autocommands
|
||||||
@@ -27,24 +23,4 @@ vim.api.nvim_create_autocmd("VimLeave", {
|
|||||||
set_kitty_opacity(default_opacity)
|
set_kitty_opacity(default_opacity)
|
||||||
end,
|
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,
|
|
||||||
})
|
|
||||||
|
|||||||
8
lua/plugins/guessIndent.lua
Normal file
8
lua/plugins/guessIndent.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
'NMAC427/guess-indent.nvim',
|
||||||
|
config = function()
|
||||||
|
require('guess-indent').setup ({
|
||||||
|
filetype_exclude = {"lua"},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
} -- Detect tabstop and shiftwidth automatically
|
||||||
@@ -26,40 +26,6 @@ return { -- adds lsp functionality and api for included languages
|
|||||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite
|
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite
|
||||||
---@module 'render-markdown'
|
---@module 'render-markdown'
|
||||||
},
|
},
|
||||||
{ -- basic tree sitter parser support
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = {
|
|
||||||
indent = { enable = true },
|
|
||||||
highlight = { enable = true },
|
|
||||||
folds = { enable = true },
|
|
||||||
ensure_installed = {
|
|
||||||
"bash",
|
|
||||||
"c",
|
|
||||||
"diff",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"jsdoc",
|
|
||||||
"json",
|
|
||||||
"lua",
|
|
||||||
"luadoc",
|
|
||||||
"luap",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"printf",
|
|
||||||
"python",
|
|
||||||
"query",
|
|
||||||
"regex",
|
|
||||||
"toml",
|
|
||||||
"tsx",
|
|
||||||
"typescript",
|
|
||||||
"vim",
|
|
||||||
"vimdoc",
|
|
||||||
"xml",
|
|
||||||
"yaml",
|
|
||||||
"zsh",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
|
|||||||
34
lua/plugins/treesitter.lua
Normal file
34
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
return { -- basic tree sitter parser support
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
indent = { enable = true },
|
||||||
|
highlight = { enable = true },
|
||||||
|
folds = { enable = true },
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"c",
|
||||||
|
"diff",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"jsdoc",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
"luap",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"printf",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"toml",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"xml",
|
||||||
|
"yaml",
|
||||||
|
"zsh",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user