Sanchayan Maity
940c66406f
Though Ruff is not an LSP in the LSP sense but using it this way gives us formatting and linting via code actions. All other Python LSP servers are garbage anyway.
14 lines
267 B
Lua
14 lines
267 B
Lua
local lsp_utils = require('lsp-utils')
|
|
local ruff_config = lsp_utils.ruff_config()
|
|
|
|
vim.lsp.start(ruff_config)
|
|
|
|
vim.bo.textwidth = 0
|
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
buffer = 0,
|
|
callback = function()
|
|
require("lint").try_lint()
|
|
end,
|
|
})
|