Skip to content

Commit

Permalink
Add python linting/format
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Aug 7, 2022
1 parent 48ace9d commit fbda874
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nvim/lua/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ local options_html = {
local options_pyright = {
on_attach = on_attach,
capabilities = capabilities_cmp,
settings = {
pyright = {
disableLanguageServices = true
}
}
}

local options_python = {
Expand Down Expand Up @@ -263,11 +268,22 @@ require("mason-lspconfig").setup_handlers({
formatCommand = "black --quiet -",
formatStdin = true,
},
{
formatCommand = "isort --quiet -",
formatStdin = true,
},
{
lintCommand = "flake8 -",
lintStdin = true,
lintFormats = {"%f:%l:%c: %m"}
}

},
yaml = { { formatCommand = "prettierd -", formatStdin = true } },
html = { { formatCommand = "prettierd -", formatStdin = true } },
css = { { formatCommand = "prettierd -", formatStdin = true } },
json = { { formatCommand = "prettier -", formatStdin = true } },

},
},
filetypes = { "lua", "python" },
Expand Down

0 comments on commit fbda874

Please sign in to comment.