mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2025-07-06 13:26:34 +05:30
feat: add python support
This commit is contained in:
@ -4,7 +4,7 @@ local capabilities = configs.capabilities
|
|||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
local servers = { "eslint", "gopls", "templ" }
|
local servers = { "eslint", "gopls", "templ", "pyright", "ruff" }
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup({
|
lspconfig[lsp].setup({
|
||||||
|
@ -19,6 +19,10 @@ local opts = {
|
|||||||
b.formatting.gofumpt,
|
b.formatting.gofumpt,
|
||||||
b.formatting.goimports,
|
b.formatting.goimports,
|
||||||
b.diagnostics.staticcheck,
|
b.diagnostics.staticcheck,
|
||||||
|
|
||||||
|
-- python
|
||||||
|
b.diagnostics.ruff,
|
||||||
|
b.formatting.black,
|
||||||
},
|
},
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
Reference in New Issue
Block a user