feat: add plugin nvim lint
This commit is contained in:
@@ -10,6 +10,7 @@ linters:
|
||||
- exportloopref
|
||||
- bodyclose
|
||||
- gofmt
|
||||
- misspell
|
||||
- gosimple
|
||||
- stylecheck
|
||||
- revive
|
||||
@@ -31,6 +32,12 @@ linters-settings:
|
||||
"-ST1021",
|
||||
"-ST1022",
|
||||
]
|
||||
misspell:
|
||||
# Correct spellings using locale preferences for US or UK.
|
||||
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
|
||||
# Default is to use a neutral variety of English.
|
||||
locale: US
|
||||
ignore-words: []
|
||||
revive:
|
||||
# Maximum number of open files at the same time.
|
||||
# See https://github.com/mgechev/revive#command-line-flags
|
||||
|
||||
+11
-1
@@ -2,7 +2,17 @@
|
||||
require 'lspconfig'.gopls.setup {
|
||||
-- cmd = {DATA_PATH .. "/lspinstall/go/gopls"},
|
||||
cmd = { "gopls", "serve" }, -- use cmd in path, I can update it easily
|
||||
settings = { gopls = { analyses = { unusedparams = true }, staticcheck = true } },
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
nilness = true,
|
||||
unusedparams = true,
|
||||
unusedwrite = true,
|
||||
useany = true,
|
||||
},
|
||||
staticcheck = false
|
||||
}
|
||||
},
|
||||
root_dir = require 'lspconfig'.util.root_pattern(".git", "go.mod", "go.work"),
|
||||
init_options = { usePlaceholders = true, completeUnimported = true },
|
||||
on_attach = require 'lsp'.common_on_attach
|
||||
|
||||
@@ -11,8 +11,9 @@ require('pluginconfig/mkdx')
|
||||
require('pluginconfig/neotest')
|
||||
require('pluginconfig/numb')
|
||||
require('pluginconfig/nvim-autopairs')
|
||||
require('pluginconfig/nvim-colorizer')
|
||||
require('pluginconfig/nvim-cmp')
|
||||
require('pluginconfig/nvim-colorizer')
|
||||
require('pluginconfig/nvim-lint')
|
||||
require('pluginconfig/fzf-lua')
|
||||
require('pluginconfig/nvim-tree') -- This plugin must be required somewhere before colorscheme. Placing it after will break navigation keymappings
|
||||
require('pluginconfig/nvim-treesitter')
|
||||
|
||||
@@ -40,6 +40,7 @@ return require("packer").startup(function(use)
|
||||
use { "williamboman/nvim-lsp-installer", opt = true }
|
||||
use { "folke/trouble.nvim", opt = true }
|
||||
use { 'stevearc/aerial.nvim', config = function() require('aerial').setup() end }
|
||||
use {'mfussenegger/nvim-lint'}
|
||||
|
||||
-- Telescope
|
||||
use { "nvim-lua/popup.nvim", opt = true }
|
||||
|
||||
Reference in New Issue
Block a user