add black and lint
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
"mini.pairs": { "branch": "main", "commit": "42407ccb80ec59c84e7c91d815f42ed90a8cc093" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "a5954f00ee88bcdf154e931198ec636a26a1077c" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lint": { "branch": "master", "commit": "3c5e34c24834a67b1cb37600ab7663eefd2b0390" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "dbdb80d3bd311989d21029c63918d67a786d5013" },
|
||||
|
8
lua/plugins/conform.lua
Normal file
8
lua/plugins/conform.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
python = { "black" },
|
||||
},
|
||||
},
|
||||
}
|
26
lua/plugins/nvim-lint.lua
Normal file
26
lua/plugins/nvim-lint.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
-- Linter pro Dateityp konfigurieren
|
||||
lint.linters_by_ft = {
|
||||
python = { "pylint" },
|
||||
}
|
||||
|
||||
-- Standardmäßig beim Speichern linten
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Optional: Mapping für manuelles Linting
|
||||
vim.keymap.set("n", "<leader>ll", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Lint current file" })
|
||||
end,
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user