latest lsp config with mason and autocomplete

This commit is contained in:
2025-12-15 15:49:30 -08:00
parent 798d6bb69c
commit acd842c2aa
5 changed files with 59 additions and 29 deletions

View File

@@ -30,30 +30,8 @@ vim.cmd("noswapfile")
vim.cmd("set autoread")
vim.cmd("set complete-=i")
vim.cmd("set lazyredraw")
vim.cmd("au FileType python set fileformat=unix encoding=utf-8")
vim.cmd("au FileType markdown,tex set spell spelllang=en_us")
-- ------------------------------------------------------------------------
-- Autoreload buffers when files change externally
-- ------------------------------------------------------------------------
-- Ensure the option is enabled (already set above, but kept for clarity)
vim.cmd("set autoread")
-- Create a dedicated augroup to avoid duplicate autocommands if this file
-- is sourced multiple times (e.g., when using :source ~/.config/nvim/init.lua).
vim.api.nvim_create_augroup("AutoReload", { clear = true })
-- Run `checktime` for the following events:
-- * CursorHold, CursorHoldI idle cursor, typical for autocheck
-- * FocusGained when you return to Neovim from another app
-- * BufEnter when you jump to a buffer that may already be stale
vim.api.nvim_create_autocmd(
{ "CursorHold", "CursorHoldI", "FocusGained", "BufEnter" },
{
group = "AutoReload",
pattern = "*",
command = "silent! checktime",
}
)