black and isort code formatting now works

This commit is contained in:
Diego Miguel M. Villamil 2024-09-27 01:11:43 +08:00
parent cdb6ede5cc
commit 56f9b62ab8
1 changed files with 17 additions and 2 deletions

View File

@ -607,14 +607,18 @@ require('lazy').setup({
lsp_format_opt = 'fallback'
end
return {
timeout_ms = 500,
timeout_ms = 2000,
lsp_format = lsp_format_opt,
}
end,
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { 'isort', 'black' },
python = {
'black',
'isort',
},
stop_after_first = false,
--
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
@ -791,6 +795,17 @@ require('lazy').setup({
end,
},
{ 'sitiom/nvim-numbertoggle' },
{ -- File system editor and explorer
'stevearc/oil.nvim',
opts = {
view_options = {
show_hidden = true,
},
},
-- Optional dependencies
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' }),
},
{ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',