dotfiles-public
dotfiles-public copied to clipboard
Suggestions
Suggestions
Hello Takuya, how are you? This is my suggestion to improve your workflow, I see you use format in save right? Well, you don't always need to format right? sometimes you just need to save, why not disable format on save and enable autosave and create new keymap to format.
example:
lspconfig.lua
local function on_attach(client, bufnr)
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', '<space>l', vim.lsp.buf.format, bufopts)
vim.api.nvim_create_autocmd({ 'InsertLeave', 'TextChanged' }, {
buffer = bufnr,
command = 'update',
})
end
looking forward to your new videos.