Added go and htmlcls lsps

This commit is contained in:
Andre Henriques 2023-09-26 14:08:09 +01:00
parent f8e343a620
commit e35cdd8c8a
4 changed files with 35 additions and 0 deletions

12
lua/andr3/langs/go.lua Normal file
View File

@ -0,0 +1,12 @@
local O = {};
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig['gopls'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
end
return O

View File

@ -0,0 +1,19 @@
local O = {};
local lspConfig = require('lspconfig')
function O.setup(on_attach, lsp_flags, capabilities)
lspConfig['cssls'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
cmd = {"css-languageserver", "--stdio"}
}
lspConfig['html'].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
cmd = {"html-languageserver", "--stdio"}
}
end
return O

View File

@ -124,6 +124,7 @@ keymap("n", "<leader>sf", "<cmd>Lspsaga lsp_finder<CR>", { silent = true })
keymap("n", "<leader>t", "<cmd>terminal<CR>", { silent = true })
keymap({"n","v"}, "<leader>ca", function () saga.code_action() end, {})
keymap("n", "gr", "<cmd>Lspsaga rename<CR>", { silent = true })
keymap("n", "<F2>", "<cmd>Lspsaga rename<CR>", { silent = true })
keymap("n", "gd", "<cmd>Lspsaga peek_definition<CR>", { silent = true })
keymap("n", "<leader>cd", "<cmd>Lspsaga show_cursor_diagnostics<CR>", { silent = true })
keymap("n", "<leader>cr", "<cmd>Lspsaga rename<CR>", { silent = true })
@ -270,4 +271,6 @@ require 'andr3.langs.bash'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.zig'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.tex'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.ocaml'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.go'.setup(on_attach, lsp_flags, capabilities)
require 'andr3.langs.htmlcss'.setup(on_attach, lsp_flags, capabilities)

View File

@ -13,6 +13,7 @@ return require('packer').startup(function()
use { "catppuccin/nvim", as = "catppuccin" }
use {'nyoom-engineering/oxocarbon.nvim'}
use 'NLKNguyen/papercolor-theme'
-- use 'baskerville/bubblegum'
use 'git@git.andr3h3nriqu3s.com:andr3/bubblegum-theme.git'
use 'xiyaowong/transparent.nvim'