latest lsp config with mason and autocomplete
This commit is contained in:
@@ -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")
|
||||
|
||||
-- ------------------------------------------------------------------------
|
||||
-- Auto‑reload 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 auto‑check
|
||||
-- * 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",
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user