mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
NeoVim & VIM
- Testing setup through neotest plugin - Spellcheck enabled on markdown and text files - Diagnosis summary through trouble plugin - Code completion keybindings improved - Auto-formatting through conform plugin - Reactjs context aware commenting through nvim-ts-context-commentstring - Auto HTML tag completion through nvim-ts-autotag - CSS color highlight through nvim-highlight-colors - Lualine: breadcrumbs, git status, single line - Auto restore neovim sessions - Better keyboard maps Shell - Aliases now load from .bashrc or .zshrc - Bash & zsh shortcuts to easy open and create projects - zoxide instead of cd when installed - bootstrap.sh shellhardened
This commit is contained in:
61
common/.config/nvim/lua/plugins/coding-lint.lua
Normal file
61
common/.config/nvim/lua/plugins/coding-lint.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
lazy = true,
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
-- Linters are only required for dynamically typed languages
|
||||
lint.linters_by_ft = {
|
||||
-- javascript = { "eslint_d" },
|
||||
-- typescript = { "eslint_d" },
|
||||
-- javascriptreact = { "eslint_d" },
|
||||
-- typescriptreact = { "eslint_d" },
|
||||
svelte = { "eslint_d" },
|
||||
python = { "pylint" },
|
||||
["*"] = { "codespell" },
|
||||
}
|
||||
|
||||
-- Uncomment and use the below section in `package.json` to enable eslint_d
|
||||
-- "eslintConfig": {
|
||||
-- "root": true,
|
||||
-- "extends": [
|
||||
-- "eslint:recommended",
|
||||
-- "plugin:@typescript-eslint/recommended"
|
||||
-- ],
|
||||
-- "parser": "@typescript-eslint/parser",
|
||||
-- "parserOptions": {
|
||||
-- "project": [
|
||||
-- "./tsconfig.json"
|
||||
-- ]
|
||||
-- },
|
||||
-- "plugins": [
|
||||
-- "@typescript-eslint"
|
||||
-- ],
|
||||
-- "rules": {
|
||||
-- "@typescript-eslint/strict-boolean-expressions": [
|
||||
-- 2,
|
||||
-- {
|
||||
-- "allowString": false,
|
||||
-- "allowNumber": false
|
||||
-- }
|
||||
-- ]
|
||||
-- },
|
||||
-- "ignorePatterns": [
|
||||
-- "src/**/*.test.ts",
|
||||
-- "src/frontend/generated/*"
|
||||
-- ]
|
||||
-- }
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user