Skip to content

Commit

Permalink
Use selene replace luacheck. Add some linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Oct 15, 2023
1 parent 490f632 commit 027ac76
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 10 deletions.
12 changes: 12 additions & 0 deletions lua/format/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ null_ls.setup({
-- CSharp
-- dotnet tool install csharpier -g
formatting.csharpier,
-- Dart
formatting.dart_format,
-- Elixir
formatting.mix,
-- Fish
Expand All @@ -57,6 +59,8 @@ null_ls.setup({
-- go install mvdan.cc/gofumpt@latest
formatting.gofumpt,
formatting.goimports_reviser,
-- Java
formatting.google_java_format,
-- Json
-- npm install -g fixjson
formatting.fixjson,
Expand All @@ -71,12 +75,18 @@ null_ls.setup({
-- OCaml
-- opam install ocamlformat
formatting.ocamlformat,
-- Perl
formatting.perlimports,
formatting.perltidy,
-- PgSQL
-- builtin postgresql
formatting.pg_format,
-- PHP
-- composer global require "squizlabs/php_codesniffer=*"
formatting.phpcsfixer,
-- Protocal Buffer
-- npm install @bufbuild/buf
formatting.buf,
-- Python
-- pip install black isort
formatting.black.with({ extra_args = { "--fast" } }),
Expand Down Expand Up @@ -145,6 +155,8 @@ null_ls.setup({
"svelte",
},
}),

completion.luasnip,
},
-- #{m}: message
-- #{s}: source name (defaults to null-ls if not specified)
Expand Down
49 changes: 39 additions & 10 deletions lua/lint/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ null_ls.setup({
diagnostics.cppcheck,
-- Clojure
diagnostics.clj_kondo,
-- CMake
-- pip install cmakelang
diagnostics.cmake_lint,
-- CSS
-- npm install stylelint
diagnostics.stylelint,
-- ECMAScript
-- npm install -g eslint_d
diagnostics.eslint_d.with({
Expand All @@ -40,6 +46,10 @@ null_ls.setup({
})
end,
}),
-- Elixir
diagnostics.credo,
-- Fish
diagnostics.fish,
-- Go
-- go install github.com/mgechev/revive@latest
-- diagnostics.revive,
Expand All @@ -50,14 +60,30 @@ null_ls.setup({
diagnostics.checkstyle.with({
extra_args = { "-c", "/google_checks.xml" }, -- or "/sun_checks.xml" or path to self written rules
}),
-- Json
-- npm install jsonlint -g
diagnostics.jsonlint,
-- Kotlin
diagnostics.ktlint,
-- Lua
-- luarocks install luacheck
-- diagnostics.luacheck,
-- cargo install selene
diagnostics.selene,
-- Makefile
-- go install github.com/mrtazz/checkmake/cmd/checkmake@latest
diagnostics.checkmake,
-- Markdown
-- npm install markdownlint --save-dev
diagnostics.markdownlint,
-- Perl
diagnostics.perlimports,
-- Protocol Buffer
-- npm install @bufbuild/buf
diagnostics.buf,
-- Python
-- pip install ruff
diagnostics.ruff,
-- Lua
-- luarocks install luacheck
diagnostics.luacheck,
-- Ruby
-- gem install standard
diagnostics.standardrb,
Expand All @@ -67,23 +93,26 @@ null_ls.setup({
-- VimScript
-- pip install vim-vint
diagnostics.vint,
-- Yaml
-- go install github.com/rhysd/actionlint/cmd/actionlint@latest
diagnostics.actionlint,
-- pip install yamllint
diagnostics.yamllint,
-- ZSH
-- builtin zsh
diagnostics.zsh,
--
-- Code actions -----------------------------------------------------------
-- Git
code_actions.gitsigns,
-- ESLint_d
-- ECMAScript
-- npm install -g eslint_d
code_actions.eslint_d,
-- GoModifyTags
-- Git
code_actions.gitsigns,
-- Go
-- go install github.com/fatih/gomodifytags@latest
code_actions.gomodifytags,
-- Impl
-- go install github.com/josharian/impl@latest
code_actions.impl,
-- ShellCheck
-- Shell
-- cabal install ShellCheck
code_actions.shellcheck,
},
Expand Down

0 comments on commit 027ac76

Please sign in to comment.