This commit is contained in:
ch1bs 2024-08-03 22:32:59 +03:00
parent d1a430248a
commit c779245033
3 changed files with 43 additions and 2 deletions

View File

@ -584,6 +584,21 @@ require('lazy').setup({
-- But for many setups, the LSP (`tsserver`) will work just fine
-- tsserver = {},
--
--
pylsp = {
settings = {
pylsp = {
plugins = {
pycodestyle = {
maxLineLength = 120,
},
flake8 = {
maxLineLength = 120,
}
}
}
}
},
lua_ls = {
-- cmd = {...},
@ -646,7 +661,7 @@ require('lazy').setup({
},
},
opts = {
notify_on_error = false,
notify_on_error = true,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
@ -659,6 +674,7 @@ require('lazy').setup({
end,
formatters_by_ft = {
lua = { 'stylua' },
python = { 'black', args = { "--line-length", "120" } },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--

View File

@ -0,0 +1,24 @@
return {
{
"stevearc/oil.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("oil").setup {
columns = { "icon" },
keymaps = {
["<C-h>"] = false,
["<M-h>"] = "actions.select_split",
},
view_options = {
show_hidden = true,
},
}
-- Open parent directory in current window
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
-- Open parent directory in floating window
vim.keymap.set("n", "<space>-", require("oil").toggle_float)
end,
},
}

View File

@ -8,7 +8,8 @@ return {
lint.linters_by_ft = {
markdown = { 'markdownlint' },
}
local flake8 = lint.linters.flake8
flake8.cmd = "flake8 --max-line-length 120"
-- To allow other plugins to add linters to require('lint').linters_by_ft,
-- instead set linters_by_ft like this:
-- lint.linters_by_ft = lint.linters_by_ft or {}