Relative Content

Tag Archive for neovimneovim-plugin

Why the event “VeryLazy” make my lsp-config not work

Background I’m a beginner to neovim and is trying to configure it. But I met with a problem. I referred to some blogs and tried to configure lsp. Some suggests that I should set the event for nvim-lspconfig as “VeryLazy”. event = { “VeryLazy” }, But after doing this, my lspconfig doesn’t work. If I […]

extmark was remove when use `nvim_buf_set_lines`

I am writing a indent (chunk) plugin, and encounter a bug, when comment a line which has extmark, the extmark was remove, detail can be seen here https://github.com/shellRaining/hlchunk.nvim/issues/109

How to format on save in neovim

vim.api.nvim_create_autocmd(
“BufWritePost”,
{
pattern = “*.py”,
group = “AutoFormat”,
callback = function()
vim.cmd(“silent !black –quiet %”)
vim.cmd(“edit”)
end,
}
)