feat(lsp): clean up commands and formatting

This commit is contained in:
Matthew Leong 2023-01-06 09:30:52 -08:00
parent 40eef214f3
commit b86e01bd1c

View file

@ -12,7 +12,7 @@ function M.on_attach(client, bufnr)
-- Enable completion triggered by <c-x><c-o> -- Enable completion triggered by <c-x><c-o>
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
if client.server_capabilities.documentFormattingProvider then if client.supports_method('textDocument/formatting') then
-- set up :LspFormat for clients that are capable -- set up :LspFormat for clients that are capable
vim.cmd(string.format("command! LspFormat lua require('cosmic.lsp.utils').format(%s)", bufnr)) vim.cmd(string.format("command! LspFormat lua require('cosmic.lsp.utils').format(%s)", bufnr))