diff --git a/init.lua b/init.lua index 4c80c36d..042de7cb 100644 --- a/init.lua +++ b/init.lua @@ -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" }, -- diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 00000000..b3b2ed59 --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,24 @@ +return { + { + "stevearc/oil.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("oil").setup { + columns = { "icon" }, + keymaps = { + [""] = false, + [""] = "actions.select_split", + }, + view_options = { + show_hidden = true, + }, + } + + -- Open parent directory in current window + vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) + + -- Open parent directory in floating window + vim.keymap.set("n", "-", require("oil").toggle_float) + end, + }, +} diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/plugins/lint.lua index 7f0dc42f..095eb8ee 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/plugins/lint.lua @@ -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 {}