dotfiles-public icon indicating copy to clipboard operation
dotfiles-public copied to clipboard

Suggestions

Open maxmx03 opened this issue 2 years ago • 0 comments

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.

maxmx03 avatar Jul 22 '22 17:07 maxmx03