Don't remember what smartindent = true does

Theme looks like shit for html
Added tailwindcss lsp for future use
Add diagnostics shortcuts
This commit is contained in:
Fabian Schmidt 2023-02-02 11:30:29 +01:00
parent 7cffe20d81
commit 6a51019731
3 changed files with 14 additions and 2 deletions

View File

@ -28,6 +28,7 @@ function settings.initMisc()
vim.opt.softtabstop = 4
vim.opt.expandtab = false
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.completeopt = { "menu", "menuone", "noselect" }
end

View File

@ -2,6 +2,11 @@
local lsp = {}
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', ',d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', '.d', vim.diagnostic.goto_next, opts)
local lsp_attach = function(client, buf)
vim.api.nvim_buf_set_option(buf, "formatexpr", "v:lua.vim.lsp.formatexpr()")
vim.api.nvim_buf_set_option(buf, "omnifunc", "v:lua.vim.lsp.omnifunc")
@ -72,7 +77,12 @@ function lsp.init()
capabilities = capabilities,
on_attach = lsp_attach
})
lspconfig.svelte.setup({
lspconfig.tailwindcss.setup({
capabilities = capabilities,
on_attach = lsp_attach
})
capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.emmet_ls.setup({
capabilities = capabilities,
on_attach = lsp_attach
})

View File

@ -34,7 +34,8 @@ function theme.initColorscheme()
additional_vim_regex_highlighting = false,
},
indent = {
enable = true
enable = true,
disable = { "html" }
}
}
end