Run stylua again

This commit is contained in:
ViViDboarder 2021-12-16 14:43:02 -08:00
parent 7b3f69cf66
commit 3051f0b294
3 changed files with 286 additions and 275 deletions

View File

@ -28,242 +28,253 @@ if vim.fn.has("nvim-0.6.0") ~= 1 then
end end
end end
return require("packer").startup({function(use) return require("packer").startup({
-- Load things faster! function(use)
use({ "lewis6991/impatient.nvim", config = [[require('impatient')]] }) -- Load things faster!
use({ "lewis6991/impatient.nvim", config = [[require('impatient')]] })
-- Let Packer manage and lazyload itself -- Let Packer manage and lazyload itself
use({ use({
"wbthomason/packer.nvim", "wbthomason/packer.nvim",
cmd = { cmd = {
"PackerClean", "PackerClean",
"PackerCompile", "PackerCompile",
"PackerInstall", "PackerInstall",
"PackerLoad", "PackerLoad",
"PackerProfile", "PackerProfile",
"PackerStatus", "PackerStatus",
"PackerSync", "PackerSync",
"PackerUpdate", "PackerUpdate",
}, },
config = [[require("plugins")]], config = [[require("plugins")]],
}) })
-- Colorschemes -- Colorschemes
use({ use({
"vim-scripts/wombat256.vim", "vim-scripts/wombat256.vim",
{ "ViViDboarder/wombat.nvim", requires = "rktjmp/lush.nvim" }, { "ViViDboarder/wombat.nvim", requires = "rktjmp/lush.nvim" },
{ "ViViDboarder/wombuddy.nvim", requires = "tjdevries/colorbuddy.vim" }, { "ViViDboarder/wombuddy.nvim", requires = "tjdevries/colorbuddy.vim" },
"ishan9299/nvim-solarized-lua", "ishan9299/nvim-solarized-lua",
{ {
"folke/tokyonight.nvim", "folke/tokyonight.nvim",
run = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length run = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length
}, },
}) })
-- Auto and ends to some ifs and dos -- Auto and ends to some ifs and dos
use("tpope/vim-endwise") use("tpope/vim-endwise")
-- Unix commands from vim? Yup! -- Unix commands from vim? Yup!
use("tpope/vim-eunuch") use("tpope/vim-eunuch")
-- Adds repeats for custom motions -- Adds repeats for custom motions
use("tpope/vim-repeat") use("tpope/vim-repeat")
-- Readline shortcuts -- Readline shortcuts
use("tpope/vim-rsi") use("tpope/vim-rsi")
-- Surround motions -- Surround motions
use("tpope/vim-surround") use("tpope/vim-surround")
-- Better netrw -- Better netrw
use("tpope/vim-vinegar") use("tpope/vim-vinegar")
-- Easier jumping to lines -- Easier jumping to lines
use("vim-scripts/file-line") use("vim-scripts/file-line")
-- Auto ctags generation -- Auto ctags generation
use("ludovicchabant/vim-gutentags") use("ludovicchabant/vim-gutentags")
-- Make it easier to discover some of my keymaps -- Make it easier to discover some of my keymaps
use({ use({
"folke/which-key.nvim", "folke/which-key.nvim",
config = function() config = function()
require("plugins.whichkey").configure() require("plugins.whichkey").configure()
end, end,
}) })
-- Better commenting -- Better commenting
use({ use({
"tomtom/tcomment_vim", "tomtom/tcomment_vim",
config = function() config = function()
vim.api.nvim_set_keymap("n", "//", ":TComment<CR>", { silent = true, noremap = true }) vim.api.nvim_set_keymap("n", "//", ":TComment<CR>", { silent = true, noremap = true })
vim.api.nvim_set_keymap("v", "//", ":TCommentBlock<CR>", { silent = true, noremap = true }) vim.api.nvim_set_keymap("v", "//", ":TCommentBlock<CR>", { silent = true, noremap = true })
end, end,
}) })
-- Allow wrapping and joining of arguments across multiple lines -- Allow wrapping and joining of arguments across multiple lines
use({ use({
"FooSoft/vim-argwrap", "FooSoft/vim-argwrap",
config = function() config = function()
vim.api.nvim_set_keymap("n", "<Leader>a", ":ArgWrap<CR>", { silent = true, noremap = true }) vim.api.nvim_set_keymap("n", "<Leader>a", ":ArgWrap<CR>", { silent = true, noremap = true })
end, end,
}) })
-- Adds git operations to vim -- Adds git operations to vim
use({ use({
"tpope/vim-fugitive", "tpope/vim-fugitive",
}) })
-- Quick toggling of Location and Quickfix lists -- Quick toggling of Location and Quickfix lists
use({ use({
"milkypostman/vim-togglelist", "milkypostman/vim-togglelist",
config = function() config = function()
vim.api.nvim_set_keymap("n", "<F6>", ":call ToggleQuickfixList()<CR>", { silent = true, noremap = true }) vim.api.nvim_set_keymap(
vim.api.nvim_set_keymap("n", "<F7>", ":call ToggleLocationList()<CR>", { silent = true, noremap = true }) "n",
end, "<F6>",
}) ":call ToggleQuickfixList()<CR>",
{ silent = true, noremap = true }
)
vim.api.nvim_set_keymap(
"n",
"<F7>",
":call ToggleLocationList()<CR>",
{ silent = true, noremap = true }
)
end,
})
-- Find text everywhere! -- Find text everywhere!
use({ use({
"mhinz/vim-grepper", "mhinz/vim-grepper",
config = function() config = function()
require("plugins.grepper") require("plugins.grepper")
end, end,
}) })
-- Highlight inline colors -- Highlight inline colors
use({ use({
"norcalli/nvim-colorizer.lua", "norcalli/nvim-colorizer.lua",
config = function() config = function()
require("colorizer").setup() require("colorizer").setup()
end, end,
}) })
-- Custom status line -- Custom status line
use({ "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" }) use({ "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" })
use({ use({
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
config = function() config = function()
require("plugins.lualine").config_lualine() require("plugins.lualine").config_lualine()
end, end,
requires = { requires = {
-- Show my current location in my status bar -- Show my current location in my status bar
-- { "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" }, -- { "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" },
}, },
after = { after = {
"nvim-gps", "nvim-gps",
}, },
}) })
-- On Mac, update colors when dark mode changes -- On Mac, update colors when dark mode changes
use({ use({
"cormacrelf/dark-notify", "cormacrelf/dark-notify",
disable = not vim.g.is_mac, disable = not vim.g.is_mac,
-- Download latest release on install -- Download latest release on install
run = "curl -s https://api.github.com/repos/cormacrelf/dark-notify/releases/latest | jq '.assets[].browser_download_url' | xargs curl -Ls | tar xz -C ~/.local/bin/", -- luacheck: no max line length run = "curl -s https://api.github.com/repos/cormacrelf/dark-notify/releases/latest | jq '.assets[].browser_download_url' | xargs curl -Ls | tar xz -C ~/.local/bin/", -- luacheck: no max line length
config = config_dark_notify, config = config_dark_notify,
requires = "nvim-lualine/lualine.nvim", requires = "nvim-lualine/lualine.nvim",
}) })
-- Custom start screen -- Custom start screen
use({ use({
"mhinz/vim-startify", "mhinz/vim-startify",
config = function() config = function()
require("utils").require_with_local("plugins.startify") require("utils").require_with_local("plugins.startify")
end, end,
}) })
-- LSP -- LSP
-- Configure language servers -- Configure language servers
use("neovim/nvim-lspconfig") use("neovim/nvim-lspconfig")
-- Better display of diagnostics -- Better display of diagnostics
use("folke/trouble.nvim") use("folke/trouble.nvim")
-- Generic linter/formatters in diagnostics API -- Generic linter/formatters in diagnostics API
use({ use({
"jose-elias-alvarez/null-ls.nvim", "jose-elias-alvarez/null-ls.nvim",
requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
}) })
-- Fancy LSP UIs -- Fancy LSP UIs
use({ use({
"glepnir/lspsaga.nvim", "glepnir/lspsaga.nvim",
requires = "neovim/nvim-lspconfig", requires = "neovim/nvim-lspconfig",
-- NOTE: Disabled because it's got issues with Neovim 0.6.0 -- NOTE: Disabled because it's got issues with Neovim 0.6.0
disable = true, disable = true,
}) })
-- Writing -- Writing
-- abolish/pencil -- abolish/pencil
use({ use({
"preservim/vim-pencil", "preservim/vim-pencil",
cmd = { "Pencil" }, cmd = { "Pencil" },
}) })
use({ use({
"preservim/vim-textobj-sentence", "preservim/vim-textobj-sentence",
requires = "kana/vim-textobj-user", requires = "kana/vim-textobj-user",
}) })
use({ use({
"junegunn/goyo.vim", "junegunn/goyo.vim",
cmd = { "Goyo", "Zen" }, cmd = { "Goyo", "Zen" },
config = [[require("plugins.goyo-limelight")]], config = [[require("plugins.goyo-limelight")]],
requires = { "junegunn/limelight.vim", cmd = "Limelight" }, requires = { "junegunn/limelight.vim", cmd = "Limelight" },
}) })
-- Treesitter -- Treesitter
use({ use({
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
run = ":TSUpdate", run = ":TSUpdate",
config = function() config = function()
require("utils").require_with_local("plugins.treesitter") require("utils").require_with_local("plugins.treesitter")
end, end,
}) })
use({ use({
"nvim-treesitter/nvim-treesitter-refactor", "nvim-treesitter/nvim-treesitter-refactor",
requires = "nvim-treesitter/nvim-treesitter", requires = "nvim-treesitter/nvim-treesitter",
}) })
use({ use({
"nvim-treesitter/nvim-treesitter-textobjects", "nvim-treesitter/nvim-treesitter-textobjects",
requires = "nvim-treesitter/nvim-treesitter", requires = "nvim-treesitter/nvim-treesitter",
}) })
--[[ --[[
use { use {
"nvim-treesitter/completion-treesitter", "nvim-treesitter/completion-treesitter",
requires = "nvim-treesitter/nvim-treesitter", requires = "nvim-treesitter/nvim-treesitter",
} }
--]] --]]
-- Completion -- Completion
use({ use({
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
config = function() config = function()
require("plugins.completion").config_cmp() require("plugins.completion").config_cmp()
end, end,
requires = { requires = {
{ "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" }, { "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" },
{ "hrsh7th/cmp-buffer", after = "nvim-cmp" }, { "hrsh7th/cmp-buffer", after = "nvim-cmp" },
{ "f3fora/cmp-spell", after = "nvim-cmp" }, { "f3fora/cmp-spell", after = "nvim-cmp" },
{ "saadparwaiz1/cmp_luasnip", after = "nvim-cmp" }, { "saadparwaiz1/cmp_luasnip", after = "nvim-cmp" },
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
}, },
event = "InsertEnter *", event = "InsertEnter *",
}) })
-- Fuzzy Finder -- Fuzzy Finder
use({ use({
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
requires = { requires = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-lua/popup.nvim", "nvim-lua/popup.nvim",
}, },
commit = pinned_commits["telescope"], commit = pinned_commits["telescope"],
config = function() config = function()
require("plugins.telescope") require("plugins.telescope")
end, end,
}) })
--[[ --[[
use { use {
'junegunn/fzf', 'junegunn/fzf',
run = ":call fzf#install()", run = ":call fzf#install()",
@ -303,43 +314,44 @@ return require("packer").startup({function(use)
} }
--]] --]]
-- Filetypes -- Filetypes
use("ViViDboarder/vim-forcedotcom") use("ViViDboarder/vim-forcedotcom")
use("rust-lang/rust.vim") use("rust-lang/rust.vim")
use("hsanson/vim-android") use("hsanson/vim-android")
use({ use({
"sheerun/vim-polyglot", "sheerun/vim-polyglot",
config = function() config = function()
vim.cmd([[ vim.cmd([[
augroup ansible_playbook augroup ansible_playbook
au BufRead,BufNewFile */playbooks/*.yml,*/playbooks/*.yaml set filetype=yaml.ansible au BufRead,BufNewFile */playbooks/*.yml,*/playbooks/*.yaml set filetype=yaml.ansible
augroup end augroup end
]]) ]])
end, end,
}) })
use({ use({
"dense-analysis/ale", "dense-analysis/ale",
config = function() config = function()
require("plugins.ale") require("plugins.ale")
end, end,
}) })
-- Debuging nvim config -- Debuging nvim config
use({ use({
"tweekmonster/startuptime.vim", "tweekmonster/startuptime.vim",
cmd = { "StartupTime" }, cmd = { "StartupTime" },
}) })
-- Auto sync after bootstrapping on a fresh box -- Auto sync after bootstrapping on a fresh box
if packer_bootstrap then if packer_bootstrap then
require("packer").sync() require("packer").sync()
end end
end, end,
config = { config = {
display = { display = {
open_fn = function() open_fn = function()
return require("packer.util").float({ border = "single" }) return require("packer.util").float({ border = "single" })
end, end,
},
}, },
}}) })

View File

@ -160,50 +160,50 @@ end
function M.config_lsp_saga() function M.config_lsp_saga()
utils.try_require("lspsaga", function(saga) utils.try_require("lspsaga", function(saga)
saga.init_lsp_saga({ saga.init_lsp_saga({
error_sign = "🔥", error_sign = "🔥",
warn_sign = "⚠️", warn_sign = "⚠️",
hint_sign = "🤔", hint_sign = "🤔",
dianostic_header_icon = " 💬 ", dianostic_header_icon = " 💬 ",
code_action_icon = "💡", code_action_icon = "💡",
code_action_prompt = { code_action_prompt = {
enable = false, enable = false,
sign = false, sign = false,
}, },
}) })
end) end)
end end
function M.config_null_ls() function M.config_null_ls()
utils.try_require("null-ls", function(null_ls) utils.try_require("null-ls", function(null_ls)
null_ls.setup({ null_ls.setup({
on_attach = default_attach, on_attach = default_attach,
capabilities = merged_capabilities(), capabilities = merged_capabilities(),
sources = { sources = {
-- Generic -- Generic
-- null_ls.builtins.formatting.preittier, -- null_ls.builtins.formatting.preittier,
-- null_ls.builtins.formatting.trim_whitespace, -- null_ls.builtins.formatting.trim_whitespace,
-- null_ls.builtins.formatting.trim_newlines, -- null_ls.builtins.formatting.trim_newlines,
-- Fish -- Fish
-- null_ls.builtins.formatting.fish_indent, -- null_ls.builtins.formatting.fish_indent,
-- Python -- Python
null_ls.builtins.formatting.reorder_python_imports, null_ls.builtins.formatting.reorder_python_imports,
null_ls.builtins.formatting.black, null_ls.builtins.formatting.black,
null_ls.builtins.diagnostics.mypy, null_ls.builtins.diagnostics.mypy,
-- Go -- Go
null_ls.builtins.diagnostics.golangci_lint, null_ls.builtins.diagnostics.golangci_lint,
-- Text -- Text
-- null_ls.builtins.code_actions.proselint, -- null_ls.builtins.code_actions.proselint,
-- Ansible -- Ansible
-- null_ls.builtins.diagnostics.ansiblelint, -- null_ls.builtins.diagnostics.ansiblelint,
-- Shell -- Shell
null_ls.builtins.diagnostics.shellcheck, null_ls.builtins.diagnostics.shellcheck,
-- Rust -- Rust
-- null_ls.builtins.formatting.rustfmt, -- null_ls.builtins.formatting.rustfmt,
-- Lua -- Lua
null_ls.builtins.diagnostics.luacheck, null_ls.builtins.diagnostics.luacheck,
null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.stylua,
}, },
}) })
end) end)
end end
return M return M

View File

@ -114,7 +114,6 @@ function M.try_require(name, on_found, on_notfound)
return nil return nil
end end
end end
return M return M