Adding formatters and linters
This commit is contained in:
committed by
Ian Roddis
parent
7adcbdf8a9
commit
c2fd9b25ea
@@ -97,6 +97,12 @@ require('lazy').setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'neovim/nvim-lspconfig'
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
-- Autocompletion
|
-- Autocompletion
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
@@ -571,6 +577,21 @@ vim.defer_fn(function()
|
|||||||
}
|
}
|
||||||
end, 0)
|
end, 0)
|
||||||
|
|
||||||
|
|
||||||
|
vim.defer_fn(function()
|
||||||
|
require('mason-tool-installer').setup {
|
||||||
|
ensure_installed = {
|
||||||
|
"clangd",
|
||||||
|
"jedi_language_server",
|
||||||
|
"ruff_lsp",
|
||||||
|
"clang-format",
|
||||||
|
"prettier",
|
||||||
|
"luaformatter",
|
||||||
|
"black"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end, 0)
|
||||||
|
|
||||||
-- [[ Configure LSP ]]
|
-- [[ Configure LSP ]]
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
@@ -656,7 +677,6 @@ local servers = {
|
|||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
@@ -666,6 +686,15 @@ local servers = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
vim.api.nvim_set_var("lsp_formatters",
|
||||||
|
{
|
||||||
|
"luaformatter",
|
||||||
|
"prettier",
|
||||||
|
"cmakelang",
|
||||||
|
"beautysh",
|
||||||
|
"clang-format",
|
||||||
|
"black",
|
||||||
|
})
|
||||||
|
|
||||||
-- Setup neovim lua configuration
|
-- Setup neovim lua configuration
|
||||||
require('neodev').setup()
|
require('neodev').setup()
|
||||||
|
|||||||
Reference in New Issue
Block a user