nvim: [HACK] add isort to python non default formatters
This commit is contained in:
parent
15dfb33122
commit
b0c16a0c41
1 changed files with 4 additions and 0 deletions
|
@ -216,6 +216,9 @@ require("formatter").setup({
|
||||||
alejandra = {
|
alejandra = {
|
||||||
require("formatter.filetypes.nix").alejandra,
|
require("formatter.filetypes.nix").alejandra,
|
||||||
},
|
},
|
||||||
|
isort = {
|
||||||
|
require("formatter.filetypes.python").isort,
|
||||||
|
},
|
||||||
|
|
||||||
-- Use the special "*" filetype for defining formatter configurations on
|
-- Use the special "*" filetype for defining formatter configurations on
|
||||||
-- any filetype
|
-- any filetype
|
||||||
|
@ -237,6 +240,7 @@ end, {
|
||||||
complete = function()
|
complete = function()
|
||||||
local languages = {
|
local languages = {
|
||||||
nix = { "alejandra" },
|
nix = { "alejandra" },
|
||||||
|
python = { "isort" },
|
||||||
}
|
}
|
||||||
return languages[vim.bo.filetype] or {}
|
return languages[vim.bo.filetype] or {}
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue