Compare commits
2 commits
0496c7a0a0
...
0740b4bda1
Author | SHA1 | Date | |
---|---|---|---|
Sanchayan Maity | 0740b4bda1 | ||
Sanchayan Maity | 940c66406f |
|
@ -23,6 +23,7 @@ b43-fwcutter
|
||||||
base
|
base
|
||||||
bash-completion
|
bash-completion
|
||||||
bat
|
bat
|
||||||
|
bc
|
||||||
bear
|
bear
|
||||||
bento4
|
bento4
|
||||||
bind
|
bind
|
||||||
|
@ -317,6 +318,7 @@ rofi
|
||||||
rp-pppoe
|
rp-pppoe
|
||||||
rsync
|
rsync
|
||||||
ruff
|
ruff
|
||||||
|
ruff-lsp
|
||||||
rust-bindgen
|
rust-bindgen
|
||||||
rustup
|
rustup
|
||||||
s-nail
|
s-nail
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
vim.bo.textwidth = 0
|
local lsp_utils = require('lsp-utils')
|
||||||
vim.bo.formatprg = "black -q -"
|
local ruff_config = lsp_utils.ruff_config()
|
||||||
|
|
||||||
vim.keymap.set('n', 'gq', "ggVGgq<C-o><C-o>", { noremap=true, silent=true, buffer=0 })
|
vim.lsp.start(ruff_config)
|
||||||
|
|
||||||
|
vim.bo.textwidth = 0
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
buffer = 0,
|
buffer = 0,
|
||||||
|
|
|
@ -11,7 +11,6 @@ nvim_lint.linters_by_ft = {
|
||||||
javascript = { 'eslint_d' },
|
javascript = { 'eslint_d' },
|
||||||
lua = { 'luacheck' },
|
lua = { 'luacheck' },
|
||||||
markdown = { 'vale' },
|
markdown = { 'vale' },
|
||||||
python = { 'ruff' },
|
|
||||||
sh = { 'shellcheck' },
|
sh = { 'shellcheck' },
|
||||||
typescript = { 'eslint_d' },
|
typescript = { 'eslint_d' },
|
||||||
yaml = { 'yamllint' },
|
yaml = { 'yamllint' },
|
||||||
|
|
|
@ -239,6 +239,20 @@ function M.ra_config()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.ruff_config()
|
||||||
|
local root_files = { 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', 'Pipfile' }
|
||||||
|
local root_directory = get_root_directory(root_files)
|
||||||
|
|
||||||
|
return {
|
||||||
|
name = "ruff",
|
||||||
|
cmd = { "ruff-lsp" },
|
||||||
|
filetypes = { 'python' },
|
||||||
|
capabilities = default_capabilities,
|
||||||
|
root_dir = root_directory,
|
||||||
|
single_file_support = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
function M.scheme_config()
|
function M.scheme_config()
|
||||||
local root_files = { '.git' }
|
local root_files = { '.git' }
|
||||||
local root_directory = get_root_directory(root_files)
|
local root_directory = get_root_directory(root_files)
|
||||||
|
|
Loading…
Reference in a new issue