Adjust nvim formatting, format lua files

This commit is contained in:
Evie Litherland-Smith 2023-04-05 15:42:29 +01:00
parent f110b8c33a
commit 4a98553740
8 changed files with 11 additions and 12 deletions

View file

@ -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,
}, },

View file

@ -1 +1 @@
return {highlight = true} return { highlight = true }

View file

@ -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
} }

View file

@ -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

View file

@ -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,
} }

View file

@ -1,5 +1,5 @@
return { return {
"tpope/vim-fugitive", "tpope/vim-fugitive",
cmd = {"G", "Git"}, cmd = { "G", "Git" },
lazy = true, lazy = true,
} }

View file

@ -36,6 +36,6 @@ return {
cmd = "CmpStatus", cmd = "CmpStatus",
}, },
{ "jose-elias-alvarez/null-ls.nvim", dependencies = { "neovim/nvim-lspconfig" }, lazy = true }, { "jose-elias-alvarez/null-ls.nvim", dependencies = { "neovim/nvim-lspconfig" }, lazy = true },
{ "mfussenegger/nvim-dap", dependencies = {"neovim/nvim-lspconfig"}, lazy = true }, { "mfussenegger/nvim-dap", dependencies = { "neovim/nvim-lspconfig" }, lazy = true },
{ "folke/neodev.nvim", dependencies = { "neovim/nvim-lspconfig", "hrsh7th/nvim-cmp" }, lazy = true }, { "folke/neodev.nvim", dependencies = { "neovim/nvim-lspconfig", "hrsh7th/nvim-cmp" }, lazy = true },
} }

View file

@ -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,
} }