Skip to content

Instantly share code, notes, and snippets.

View Chattille's full-sized avatar
😙

Chattille

😙
View GitHub Profile
@Chattille
Chattille / autoclose_neovim.lua
Last active May 19, 2023 02:44
Quit NeoVim or current tab if there is only one non-autoclosable window.
---Filetypes ignored on quit
local autoclosables = {
'NvimTree',
'Outline',
'dap-repl',
'dapui_console',
'dapui_scopes',
'dapui_stacks',
'dapui_watches',
'dapui_breakpoints',
@Chattille
Chattille / auto_refresh_codelens.lua
Last active June 20, 2024 12:29
Refresh Codelens on LSP attachment in Neovim
-- trigger upon LSP attachment
vim.api.nvim_create_autocmd('User', {
pattern = 'LspAttached',
once = true,
callback = vim.lsp.codelens.refresh,
})
-- ... servers and enhanced_opts ...
for _, lsp in ipairs(servers) do