This uses prettier to format and typescript-language-server as the language server.
QKXSAPK72YBZXXIZDA6NDWIRNXU3BAAEM6WGDZTDODDJJSAHOIHAC
WOVOJYXQSEPSUTQGPT625ZIXV7GHKFRJ64CGGL64QBNOIRHOKVTAC
6TJTI7RQ5QVCBPW6BKPUL6XUFWUIMXH774UAFCHACDJQWDMPSZNQC
5C7V5HBQN72EONBIORLYJPIY4OYZTI3YJEWIDCTLSDOQ44N6W4YAC
neoformat
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
-- buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
local servers = {"rust_analyzer", "pyright", "tsserver"};
local servers = {"rust_analyzer", "pyright"};
nvim_lsp[server].setup { on_attach = on_attach; }
nvim_lsp[server].setup {
on_attach = on_attach;
}
nvim_lsp["tsserver"].setup { on_attach = function(client, bufnr) client.resolved_capabilities.document_formatting = false; on_attach(client, bufnr) end;}
nvim_lsp["tsserver"].setup {
on_attach = function(client, bufnr)
client.resolved_capabilities.document_formatting = false;
on_attach(client, bufnr)
end;
vim.cmd('autocmd BufWritePre *.js,*.ts,*.tsx,*.jsx Neoformat prettier')
vim.cmd(
'autocmd BufWritePre *.js,*.ts,*.tsx,*.jsx Neoformat prettier'
)