|
|
|
@ -13,6 +13,9 @@ Plug 'nvim-lua/plenary.nvim' " Dependecy for telescope
|
|
|
|
|
Plug 'nvim-lua/telescope.nvim'
|
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " Dependecy for telescope
|
|
|
|
|
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
|
|
|
Plug 'rodjek/vim-puppet'
|
|
|
|
|
Plug 'mrk21/yaml-vim' " For hieradata
|
|
|
|
|
Plug 'vim-ruby/vim-ruby' " For Facts, Ruby functions, and custom providers
|
|
|
|
|
Plug 'WhoIsSethDaniel/toggle-lsp-diagnostics.nvim'
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
@ -135,7 +138,6 @@ local on_attach = function(client, bufnr)
|
|
|
|
|
local hl = "DiagnosticSign" .. type
|
|
|
|
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- set up completion
|
|
|
|
@ -194,7 +196,7 @@ local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protoco
|
|
|
|
|
|
|
|
|
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
|
|
|
|
-- map buffer local keybindings when the language server attaches
|
|
|
|
|
local servers = { 'pyright', 'pylsp', 'bashls', 'clangd'}
|
|
|
|
|
local servers = { 'pylsp', 'clangd', 'puppet', 'bashls'}
|
|
|
|
|
for _, lsp in ipairs(servers) do
|
|
|
|
|
nvim_lsp[lsp].setup {
|
|
|
|
|
capabilities = capabilities,
|
|
|
|
@ -205,18 +207,28 @@ for _, lsp in ipairs(servers) do
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- set up formatting
|
|
|
|
|
-- require "lspconfig".efm.setup {
|
|
|
|
|
-- init_options = {documentFormatting = true},
|
|
|
|
|
-- settings = {
|
|
|
|
|
-- rootMarkers = {".git/"},
|
|
|
|
|
-- languages = {
|
|
|
|
|
-- python = {
|
|
|
|
|
-- {formatCommand = "yapf --quiet", formatStdin = true},
|
|
|
|
|
-- {formatCommand = "isort -d -", formatStdin = true}
|
|
|
|
|
-- }
|
|
|
|
|
-- }
|
|
|
|
|
-- }
|
|
|
|
|
-- }
|
|
|
|
|
nvim_lsp["efm"].setup {
|
|
|
|
|
capabilities = capabilities,
|
|
|
|
|
on_attach = on_attach,
|
|
|
|
|
flags = {
|
|
|
|
|
debounce_text_changes = 150,
|
|
|
|
|
},
|
|
|
|
|
init_options = {documentFormatting = true},
|
|
|
|
|
filetypes = { 'sh', 'puppet'},
|
|
|
|
|
settings = {
|
|
|
|
|
rootMarkers = {".git/"},
|
|
|
|
|
languages = {
|
|
|
|
|
puppet = {
|
|
|
|
|
{
|
|
|
|
|
formatCommand = 'puppet-fix', formatStdin = true, lintCommand = 'puppet-lint --log-format "%{filename}:%{line}:%{column}: %{kind}: %{message}. [%{check}]"', lintSource = 'puppet-lint', lintFormats= {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
sh = {
|
|
|
|
|
{
|
|
|
|
|
formatCommand = "shfmt -i 2", formatStdin = true, lintCommand = 'shellcheck -f gcc -x', lintSource = 'shellcheck', lintFormats= {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
EOF
|
|
|
|
|