mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
adding null_ls to fill the gap of linters that don't have LSPs
This commit is contained in:
parent
aef212aded
commit
4be9a4d4f0
5 changed files with 42 additions and 1 deletions
|
@ -49,6 +49,9 @@ require("user.toggleterm")
|
|||
-- Language Server configs and other syntax checking and highlight tools
|
||||
require('user.lsp-configs')
|
||||
|
||||
-- Language server configs for stuff that doesn't have it
|
||||
require('user.null_ls')
|
||||
|
||||
-- autocommand to disable lsp semantic highlighting for parameter/variable in
|
||||
-- Dockerfile because it competes with treesitter and is worse
|
||||
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
|
||||
|
|
8
.config/nvim/lua/user/guard.lua
Normal file
8
.config/nvim/lua/user/guard.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
-- https://github.com/nvimdev/guard.nvim
|
||||
{
|
||||
cmd = "hadolint",
|
||||
args = "",
|
||||
fname = "Dockerfile",
|
||||
stdin = true,
|
||||
timeout = "30", --integer
|
||||
}
|
|
@ -320,6 +320,15 @@ local plugins = {
|
|||
cmd = "TSUpdateSync",
|
||||
build = "MasonUpdate" -- :MasonUpdate updates registry contents
|
||||
},
|
||||
-- this helps bridge the gap between additional linters that don't have proper LSP
|
||||
{
|
||||
'jose-elias-alvarez/null-ls.nvim'
|
||||
},
|
||||
-- may replace null-ls since it is being deprecated
|
||||
--{
|
||||
-- 'nvimdev/guard.nvim'
|
||||
--},
|
||||
|
||||
-- Diagnostics with leader key + d
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
|
|
|
@ -34,7 +34,6 @@ lspconfig.dockerls.setup{
|
|||
capabilities = capabilities
|
||||
}
|
||||
|
||||
|
||||
-- helm
|
||||
local configs = require('lspconfig.configs')
|
||||
local util = require('lspconfig.util')
|
||||
|
|
22
.config/nvim/lua/user/null_ls.lua
Normal file
22
.config/nvim/lua/user/null_ls.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
-- TODO: replace null_ls because it's being archived, see:
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/issues/1621
|
||||
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
-- linting for Dockerfile best practices
|
||||
null_ls.builtins.diagnostics.hadolint,
|
||||
-- markdown linting for actual language
|
||||
null_ls.builtins.diagnostics.vale.with {
|
||||
filetypes = {
|
||||
'asciidoc',
|
||||
'markdown',
|
||||
'tex',
|
||||
'text',
|
||||
},
|
||||
},
|
||||
-- this should lint github actions
|
||||
null_ls.builtins.diagnostics.actionlint
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue