style(nvim): format with stylua

This commit is contained in:
Price Hiller 2023-03-02 18:28:31 -06:00
parent d565b26a8f
commit 5bec1553f0
No known key found for this signature in database
29 changed files with 221 additions and 221 deletions

View File

@ -1,3 +1,3 @@
local file_loc = vim.fn.expand('%:p:h') local file_loc = vim.fn.expand("%:p:h")
vim.opt_local.makeprg = 'docker build ' .. file_loc vim.opt_local.makeprg = "docker build " .. file_loc

View File

@ -1 +1 @@
vim.opt_local.filetype = 'gitcommit' vim.opt_local.filetype = "gitcommit"

View File

@ -1 +1 @@
vim.opt_local.filetype = 'yaml' vim.opt_local.filetype = "yaml"

View File

@ -1,10 +1,10 @@
vim.keymap.set('n', '<leader>fr', '<Plug>RestNvim', { vim.keymap.set("n", "<leader>fr", "<Plug>RestNvim", {
buffer = true, buffer = true,
}) })
vim.keymap.set('n', '<leader>fp', '<Plug>RestNvimPreview', { vim.keymap.set("n", "<leader>fp", "<Plug>RestNvimPreview", {
buffer = true, buffer = true,
}) })
vim.keymap.set('n', '<leader>fl', '<Plug>RestNvimLast', { vim.keymap.set("n", "<leader>fl", "<Plug>RestNvimLast", {
buffer = true, buffer = true,
}) })

View File

@ -1,6 +1,6 @@
vim.keymap.set('n', '<leader>fge', ':Neorg gtd edit<CR>', { vim.keymap.set("n", "<leader>fge", ":Neorg gtd edit<CR>", {
buffer = true, buffer = true,
}) })
vim.keymap.set('n', '<ledaer>fgv', ':Neorg gtd views<CR>', { vim.keymap.set("n", "<ledaer>fgv", ":Neorg gtd views<CR>", {
buffer = true, buffer = true,
}) })

View File

@ -1,13 +1,13 @@
vim.keymap.set('n', '<leader>fe', '<Plug>(sqls-execute-query)', { vim.keymap.set("n", "<leader>fe", "<Plug>(sqls-execute-query)", {
buffer = true, buffer = true,
}) })
vim.keymap.set('v', '<leader>fe', '<Plug>(sqls-execute-query)', { vim.keymap.set("v", "<leader>fe", "<Plug>(sqls-execute-query)", {
buffer = true, buffer = true,
}) })
vim.keymap.set('n', '<leader>fsd', ':SqlsSwitchDatabase<CR>', { vim.keymap.set("n", "<leader>fsd", ":SqlsSwitchDatabase<CR>", {
buffer = true, buffer = true,
}) })
vim.keymap.set('n', '<leader>fsc', ':SqlsSwitchConnection<CR>', { vim.keymap.set("n", "<leader>fsc", ":SqlsSwitchConnection<CR>", {
buffer = true, buffer = true,
}) })

View File

@ -1 +1 @@
require('main') require("main")

View File

@ -1,24 +1,24 @@
local M = {} local M = {}
M.setup = function() M.setup = function()
local disabled_built_ins = { local disabled_built_ins = {
'gzip', "gzip",
'zip', "zip",
'zipPlugin', "zipPlugin",
'tar', "tar",
'tarPlugin', "tarPlugin",
'getscript', "getscript",
'getscriptPlugin', "getscriptPlugin",
'vimball', "vimball",
'vimballPlugin', "vimballPlugin",
'2html_plugin', "2html_plugin",
'logipat', "logipat",
'rrhelper', "rrhelper",
'spellfile_plugin', "spellfile_plugin",
'matchit', "matchit",
} }
for _, plugin in pairs(disabled_built_ins) do for _, plugin in pairs(disabled_built_ins) do
vim.g['loaded_' .. plugin] = 1 vim.g["loaded_" .. plugin] = 1
end end
end end

View File

@ -4,7 +4,7 @@ M.setup = function()
vim.filetype.add({ vim.filetype.add({
pattern = { pattern = {
[".*%.dockerfile"] = "dockerfile", [".*%.dockerfile"] = "dockerfile",
[".*%.dockerignore"] = "gitignore" [".*%.dockerignore"] = "gitignore",
}, },
}) })
end end

View File

@ -129,7 +129,6 @@ M.setup = function()
-- Improved diff -- Improved diff
opt.diffopt:append("linematch:75") opt.diffopt:append("linematch:75")
opt.fillchars:append("diff:") opt.fillchars:append("diff:")
end end
return M return M

View File

@ -1,22 +1,22 @@
local M = {} local M = {}
M.winbar = function() M.winbar = function()
local win_number = '[' .. vim.api.nvim_win_get_number(0) .. ']' local win_number = "[" .. vim.api.nvim_win_get_number(0) .. "]"
local ignore_fts = { local ignore_fts = {
'neo-tree', "neo-tree",
'dashboard', "dashboard",
'alpha', "alpha",
} }
for _, ft in ipairs(ignore_fts) do for _, ft in ipairs(ignore_fts) do
if ft == vim.bo.filetype then if ft == vim.bo.filetype then
return win_number .. ' ' .. ft return win_number .. " " .. ft
end end
end end
local relative_path = vim.fn.fnamemodify(vim.fn.expand('%:h'), ':p:~:.') local relative_path = vim.fn.fnamemodify(vim.fn.expand("%:h"), ":p:~:.")
local filename = vim.fn.expand('%:t') local filename = vim.fn.expand("%:t")
return win_number .. '' .. relative_path .. filename return win_number .. "" .. relative_path .. filename
end end
M.setup = function() M.setup = function()

View File

@ -4,13 +4,13 @@
-- INFO: SHOULD have a init.lua file associated with them. -- INFO: SHOULD have a init.lua file associated with them.
-- INFO: init.lua is responsible for loading all configuration -- INFO: init.lua is responsible for loading all configuration
-- INFO: related to that directory. -- INFO: related to that directory.
require('core.init') require("core.init")
require('plugins.init') require("plugins.init")
-- INFO: Post load, for things that need to setup keybindings etc after the fact -- INFO: Post load, for things that need to setup keybindings etc after the fact
-- --
-- NOTE: All postload modules should be independent of each other, they shouldn't -- NOTE: All postload modules should be independent of each other, they shouldn't
-- NOTE: rely on each other's load order. That type of logic should be shifted -- NOTE: rely on each other's load order. That type of logic should be shifted
-- NOTE: into non-postload regions then handled in postload modules. -- NOTE: into non-postload regions then handled in postload modules.
require('plugins.postload') require("plugins.postload")
require('core.postload') require("core.postload")

View File

@ -1,39 +1,39 @@
local neorg = require('neorg') local neorg = require("neorg")
neorg.setup({ neorg.setup({
load = { load = {
['core.defaults'] = {}, ["core.defaults"] = {},
['core.norg.concealer'] = {}, ["core.norg.concealer"] = {},
['core.norg.esupports.metagen'] = { ["core.norg.esupports.metagen"] = {
config = { config = {
type = 'auto', type = "auto",
}, },
}, },
['core.integrations.nvim-cmp'] = { ["core.integrations.nvim-cmp"] = {
config = {}, config = {},
}, },
['core.norg.completion'] = { ["core.norg.completion"] = {
config = { config = {
engine = 'nvim-cmp', engine = "nvim-cmp",
}, },
}, },
['core.keybinds'] = { ["core.keybinds"] = {
config = { config = {
default_keybinds = true, default_keybinds = true,
-- norg_leader = "-" -- norg_leader = "-"
}, },
}, },
['core.norg.dirman'] = { ["core.norg.dirman"] = {
config = { config = {
workspaces = { workspaces = {
default = '~/.notes', -- Format: <name_of_workspace> = <path_to_workspace_root> default = "~/.notes", -- Format: <name_of_workspace> = <path_to_workspace_root>
}, },
autochdir = true, -- Automatically change the directory to the current workspace's root every time autochdir = true, -- Automatically change the directory to the current workspace's root every time
index = 'index.norg', -- The name of the main (root) .norg file index = "index.norg", -- The name of the main (root) .norg file
last_workspace = vim.fn.stdpath('cache') .. '/neorg_last_workspace.txt', -- The location to write and read the workspace cache file last_workspace = vim.fn.stdpath("cache") .. "/neorg_last_workspace.txt", -- The location to write and read the workspace cache file
}, },
}, },
['core.integrations.telescope'] = {}, ["core.integrations.telescope"] = {},
['core.norg.qol.toc'] = {}, ["core.norg.qol.toc"] = {},
}, },
}) })

View File

@ -1,18 +1,18 @@
require('stabilize').setup({ require("stabilize").setup({
-- stabilize window even when current cursor position will be hidden behind new window -- stabilize window even when current cursor position will be hidden behind new window
force = true, force = true,
-- set context mark to register on force event which can be jumped to with '<forcemark> -- set context mark to register on force event which can be jumped to with '<forcemark>
forcemark = nil, forcemark = nil,
-- do not manage windows matching these file/buftypes -- do not manage windows matching these file/buftypes
ignore = { ignore = {
filetype = { 'packer', 'Dashboard', 'Trouble', 'TelescopePrompt' }, filetype = { "packer", "Dashboard", "Trouble", "TelescopePrompt" },
buftype = { buftype = {
'packer', "packer",
'Dashboard', "Dashboard",
'terminal', "terminal",
'quickfix', "quickfix",
'loclist', "loclist",
'LspInstall', "LspInstall",
}, },
}, },
-- comma-separated list of autocmds that wil trigger the plugins window restore function -- comma-separated list of autocmds that wil trigger the plugins window restore function

View File

@ -1,9 +1,9 @@
local fn = vim.fn local fn = vim.fn
require('dapui').setup({}) require("dapui").setup({})
fn.sign_define('DapBreakpoint', { text = '', texthl = 'DiagnosticSignError', linehl = '', numhl = '' }) fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
fn.sign_define('DapBreakpointCondition', { text = '', texthl = 'DiagnosticSignWarn', linehl = '', numhl = '' }) fn.sign_define("DapBreakpointCondition", { text = "", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" })
fn.sign_define('DapLogPoint', { text = '', texthl = 'DiagnosticSignInfo', linehl = '', numhl = '' }) fn.sign_define("DapLogPoint", { text = "", texthl = "DiagnosticSignInfo", linehl = "", numhl = "" })
fn.sign_define('DapStopped', { text = '', texthl = 'DiagnosticSignWarn', linehl = '', numhl = '' }) fn.sign_define("DapStopped", { text = "", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" })
fn.sign_define('DapBreakpointReject', { text = '', texthl = 'DiagnosticSignHint', linehl = '', numhl = '' }) fn.sign_define("DapBreakpointReject", { text = "", texthl = "DiagnosticSignHint", linehl = "", numhl = "" })

View File

@ -1,4 +1,4 @@
local nvim_tree = require('nvim-tree.configs') local nvim_tree = require("nvim-tree.configs")
nvim_tree.setup({ nvim_tree.setup({
highlight = { highlight = {
@ -6,8 +6,8 @@ nvim_tree.setup({
additional_vim_regex_highlighting = true, additional_vim_regex_highlighting = true,
disable = { disable = {
-- Ansible support reasons -- Ansible support reasons
'ansible.yaml', "ansible.yaml",
'yaml.ansible' "yaml.ansible",
}, },
}, },
matchup = { matchup = {

View File

@ -1,14 +1,13 @@
local hydra = require("hydra") local hydra = require("hydra")
local wk = require("which-key") local wk = require("which-key")
wk.register( wk.register({
{ h = { h = {
name = "Hydra", name = "Hydra",
o = { "Options" }, o = { "Options" },
g = { "Git Signs" }, g = { "Git Signs" },
d = { "Diagram" }, d = { "Diagram" },
} }, },
{ prefix = "<leader>" } }, { prefix = "<leader>" })
)
-- Side Scroll -- Side Scroll
hydra({ hydra({

View File

@ -16,7 +16,7 @@ g.indent_blankline_filetype_exclude = {
"man", "man",
"OverseerForm", "OverseerForm",
"noice", "noice",
"lazy" "lazy",
} }
g.indent_blankline_buftype_exclude = { "terminal" } g.indent_blankline_buftype_exclude = { "terminal" }

View File

@ -120,7 +120,7 @@ require("kanagawa").setup({
NoiceCmdlinePopupdBorderIncRename = { fg = colors.peachRed }, NoiceCmdlinePopupdBorderIncRename = { fg = colors.peachRed },
Folded = { bg = colors.waveBlue1 }, Folded = { bg = colors.waveBlue1 },
UfoFoldedBg = { bg = "NONE" } UfoFoldedBg = { bg = "NONE" },
}, },
}) })

View File

@ -348,7 +348,7 @@ vim.api.nvim_create_autocmd("FileType", {
cmd = { lsp_server_bin_dir .. "nginx-language-server" }, cmd = { lsp_server_bin_dir .. "nginx-language-server" },
root_dir = vim.fn.getcwd(), root_dir = vim.fn.getcwd(),
capabilities = lsp_capabilities, capabilities = lsp_capabilities,
on_attach = on_attach on_attach = on_attach,
}) })
if client_id then if client_id then

View File

@ -1,9 +1,9 @@
local null_ls = require('null-ls') local null_ls = require("null-ls")
null_ls.setup({ null_ls.setup({
sources = { sources = {
null_ls.builtins.formatting.shfmt.with({ null_ls.builtins.formatting.shfmt.with({
extra_args = { '-i 4' }, extra_args = { "-i 4" },
}), }),
null_ls.builtins.diagnostics.shellcheck, null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.code_actions.shellcheck, null_ls.builtins.code_actions.shellcheck,

View File

@ -40,5 +40,5 @@ require("ufo").setup({
provider_selector = function(bufnr, filetype, buftype) provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" } return { "treesitter", "indent" }
end, end,
fold_virt_text_handler = handler fold_virt_text_handler = handler,
}) })

View File

@ -105,7 +105,7 @@ lualine.setup({
{ {
"macro-recording", "macro-recording",
color = { color = {
fg = "#FF9E3B" fg = "#FF9E3B",
}, },
fmt = show_macro_recording, fmt = show_macro_recording,
}, },
@ -164,7 +164,7 @@ lualine.setup({
{ {
"macro-recording", "macro-recording",
color = { color = {
fg = "#FF9E3B" fg = "#FF9E3B",
}, },
fmt = show_macro_recording, fmt = show_macro_recording,
}, },
@ -201,8 +201,8 @@ lualine.setup({
fmt = datetime_section, fmt = datetime_section,
color = "LuaLineDateTime", color = "LuaLineDateTime",
separator = { separator = {
right = '%#lualine_transitional_lualine_b_normal_to_lualine_c_normal#' right = "%#lualine_transitional_lualine_b_normal_to_lualine_c_normal#",
} },
}, },
}, },
lualine_y = { lualine_y = {

View File

@ -1 +1 @@
require('todo-comments').setup({}) require("todo-comments").setup({})

View File

@ -20,5 +20,5 @@ nvim_treesitter.setup({
}, },
}) })
require('treesitter-context').setup({}) require("treesitter-context").setup({})
vim.cmd.TSContextEnable() vim.cmd.TSContextEnable()

View File

@ -1 +1 @@
require('plugins.plugins') require("plugins.plugins")

View File

@ -103,8 +103,10 @@ lazy.setup({
}, },
{ {
"chrisgrieser/nvim-various-textobjs",
config = function()
require("various-textobjs").setup({ require("various-textobjs").setup({
useDefaultKeymaps = true useDefaultKeymaps = true,
}) })
end, end,
}, },

View File

@ -1,4 +1,4 @@
-- Anything that needs to be loaded LAST -- Anything that needs to be loaded LAST
-- needs to required here -- needs to required here
require('plugins.mappings') require("plugins.mappings")
require('plugins.autocmds') require("plugins.autocmds")