update
This commit is contained in:
parent
d1a430248a
commit
c779245033
18
init.lua
18
init.lua
|
@ -584,6 +584,21 @@ require('lazy').setup({
|
||||||
-- But for many setups, the LSP (`tsserver`) will work just fine
|
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
--
|
--
|
||||||
|
--
|
||||||
|
pylsp = {
|
||||||
|
settings = {
|
||||||
|
pylsp = {
|
||||||
|
plugins = {
|
||||||
|
pycodestyle = {
|
||||||
|
maxLineLength = 120,
|
||||||
|
},
|
||||||
|
flake8 = {
|
||||||
|
maxLineLength = 120,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = {...},
|
-- cmd = {...},
|
||||||
|
@ -646,7 +661,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
notify_on_error = true,
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
-- have a well standardized coding style. You can add additional
|
-- have a well standardized coding style. You can add additional
|
||||||
|
@ -659,6 +674,7 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
|
python = { 'black', args = { "--line-length", "120" } },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
|
|
|
@ -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,
|
||||||
|
},
|
||||||
|
}
|
|
@ -8,7 +8,8 @@ return {
|
||||||
lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
markdown = { 'markdownlint' },
|
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,
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
-- instead set linters_by_ft like this:
|
-- instead set linters_by_ft like this:
|
||||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||||
|
|
Loading…
Reference in New Issue