feat: add python formatting
This commit is contained in:
1 parent
e71b388358
commit
4724eb8dd5
3 files changed
+7
-1
No files matched your search
@@ -22,3 +22,4 @@ Language servers and formatters, per language:
|
||||
- JavaScript/TypeScript: typescript (7+, uses `tsc --lsp`)
|
||||
- HTML/CSS/JSON: vscode-langservers-extracted
|
||||
- Lua: lua-language-server
|
||||
- Python: basedpyright, ruff
|
||||
@@ -0,0 +1,5 @@
|
||||
local format = require("plugins/vis-plug").plugins.format
|
||||
|
||||
return format.stdio_formatter(function(win)
|
||||
return "ruff format" .. format.with_filename(win, " --stdin-filename ") .. " -"
|
||||
end)
|
||||
@@ -47,7 +47,7 @@ for _, syntax in ipairs(servers) do
|
||||
ls_map[syntax] = require("lsp/" .. syntax)
|
||||
end
|
||||
|
||||
local formatters = { "ansi_c", "cpp", "csharp" }
|
||||
local formatters = { "ansi_c", "cpp", "csharp", "python" }
|
||||
local format = plug.plugins.format
|
||||
local on_save_syntaxes = {}
|
||||
for _, syntax in ipairs(formatters) do
|
||||
|
||||
Reference in new issue
Block a user