Adjust nvim formatting, format lua files
This commit is contained in:
parent
f110b8c33a
commit
4a98553740
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
close_if_last_window = true,
|
close_if_last_window = true,
|
||||||
|
use_popups_for_input = false,
|
||||||
filesystem = {
|
filesystem = {
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
|
@ -13,6 +14,7 @@ return {
|
||||||
group_empty_dirs = true,
|
group_empty_dirs = true,
|
||||||
},
|
},
|
||||||
buffers = {
|
buffers = {
|
||||||
|
bind_to_cwd = true,
|
||||||
follow_current_file = true,
|
follow_current_file = true,
|
||||||
group_empty_dirs = true,
|
group_empty_dirs = true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,10 +18,6 @@ return {
|
||||||
gitsigns = { enabled = true },
|
gitsigns = { enabled = true },
|
||||||
tmux = { enabled = true },
|
tmux = { enabled = true },
|
||||||
},
|
},
|
||||||
on_open = function (win)
|
on_open = function(win) vim.wo.scrolloff = 999 end,
|
||||||
vim.wo.scrolloff = 999
|
on_close = function(win) vim.wo.scrolloff = 0 end,
|
||||||
end,
|
|
||||||
on_close = function (win)
|
|
||||||
vim.wo.scrolloff = 0
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ local lsp_formatting = function(bufnr)
|
||||||
bufnr = bufnr,
|
bufnr = bufnr,
|
||||||
timeout_ms = 2000,
|
timeout_ms = 2000,
|
||||||
async = true,
|
async = true,
|
||||||
|
filter = function(client) return client.name == "null-ls" end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return lsp_formatting
|
return lsp_formatting
|
||||||
|
|
|
@ -6,6 +6,8 @@ return {
|
||||||
null_ls.builtins.diagnostics.ruff,
|
null_ls.builtins.diagnostics.ruff,
|
||||||
null_ls.builtins.formatting.black,
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
|
null_ls.builtins.formatting.stylua,
|
||||||
|
null_ls.builtins.formatting.prettier,
|
||||||
null_ls.builtins.formatting.trim_whitespace,
|
null_ls.builtins.formatting.trim_whitespace,
|
||||||
null_ls.builtins.hover.dictionary,
|
null_ls.builtins.hover.dictionary,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
return {
|
return {
|
||||||
"ahmedkhalf/project.nvim",
|
"ahmedkhalf/project.nvim",
|
||||||
config = function()
|
config = function() require("project_nvim").setup(require "config.project") end,
|
||||||
require("project_nvim").setup(require("config.project"))
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue