Skip to content

Commit

Permalink
adding yaml stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago-Assis-T committed Aug 14, 2023
1 parent f288bf2 commit 1201e35
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/plugins/lsp/formatter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ require('formatter').setup({
bash = {
require('formatter.filetypes.sh').shfmt,
},
yaml = {
require('formatter.filetypes.yaml').prettierd,
},

-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
Expand Down
1 change: 1 addition & 0 deletions lua/plugins/lsp/linter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ require('lint').linters_by_ft = {
javascriptreact = { 'eslint_d' },
typescriptreact = { 'eslint_d' },
bash = { 'shellcheck' },
yaml = { 'yamllint' },
}
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
callback = function()
Expand Down
2 changes: 2 additions & 0 deletions lua/plugins/lsp/mason.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ require('mason').setup({
require('mason-lspconfig').setup({})
require('mason-tool-installer').setup({
ensure_installed = {
'yamlls',
'yamllint',
'eslint_d',
'prettierd',
'luacheck',
Expand Down
7 changes: 7 additions & 0 deletions lua/plugins/lsp/servers/yaml-lsp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
local lspconfig = require('lspconfig')
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true

lspconfig.yamlls.setup({
capabilities = capabilities,
})

0 comments on commit 1201e35

Please sign in to comment.