lsp
lsp copied to clipboard
Ignore formatting errors for long loading language server
How can I ignore this errors?
My svelteserver config:
if executable('svelteserver')
lsp#lsp#AddServer([{
name: 'svelteserver',
filetype: ['svelte'],
path: 'svelteserver',
args: ['--stdio'],
syncInit: v:true
}])
endif
My efm-langserver config:
if executable('efm-langserver')
lsp#lsp#AddServer([{
name: 'efm',
filetype: [
'javascript',
'javascriptreact',
'typescript',
'typescriptreact',
'fish',
'gitcommit',
'lua',
'python',
'vue',
'sh',
'svelte',
'markdown',
'rst',
'yaml'
],
path: 'efm-langserver',
args: [],
initializationOptions: {
'documentFormatting': v:true
},
features: {
'documentFormatting': v:true
},
syncInit: v:true
}])
endif
LspAttached config:
def OnLspBufferAttached()
augroup lsp_format
autocmd! BufWritePre *.py,*.sh,*.svelte,*.toml,*.vue,*.rb,*.html,*.json,*.yaml,*.lua,*.css,*.js,*.jsx,*.ts,*.tsx,*.rs,*.go,*.dart,*.md,*.c,*.cpp :LspFormat
augroup END
enddef
augroup lsp_attach
au!
au User LspAttached call s:OnLspBufferAttached()
augroup END
When do you see this error message? Do you see this message after loading a new file or do you see this message every time after saving a file?
When do you see this error message? Do you see this message after loading a new file or do you see this message every time after saving a file?
Every time after saving a file for about 30 seconds until prettier configured with efm formats my file
Hi, I've been having a similar issue when running efm-langserver that was trying to run mypy on save when it wasn't on my path. But it happened only when I've was trying to save a file with no modifications.