Skip to content

Commit

Permalink
feat: add yapf (chipsalliance#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfst authored Aug 17, 2022
1 parent dc51f14 commit ec7c134
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/mason-registry/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ return {
xo = "mason-registry.xo",
["yaml-language-server"] = "mason-registry.yaml-language-server",
yamllint = "mason-registry.yamllint",
yapf = "mason-registry.yapf",
zk = "mason-registry.zk",
zls = "mason-registry.zls"
}
11 changes: 11 additions & 0 deletions lua/mason-registry/yapf/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local Pkg = require "mason-core.package"
local pip3 = require "mason-core.managers.pip3"

return Pkg.new {
name = "yapf",
desc = [[YAPF, Yet Another Python Formatter]],
homepage = "https://pypi.org/project/yapf/",
languages = { Pkg.Lang.Python },
categories = { Pkg.Cat.Formatter },
install = pip3.packages { "yapf", bin = { "yapf" } },
}
2 changes: 1 addition & 1 deletion lua/mason/mappings/language.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ return {
protobuf = { "buf" },
puppet = { "puppet-editor-services" },
purescript = { "purescript-language-server" },
python = { "autopep8", "black", "blue", "debugpy", "flake8", "isort", "jedi-language-server", "mypy", "pylint", "pyright", "python-lsp-server", "sourcery", "vulture" },
python = { "autopep8", "black", "blue", "debugpy", "flake8", "isort", "jedi-language-server", "mypy", "pylint", "pyright", "python-lsp-server", "sourcery", "vulture", "yapf" },
r = { "r-languageserver" },
reason = { "reason-language-server" },
rescript = { "rescript-lsp" },
Expand Down

0 comments on commit ec7c134

Please sign in to comment.