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,
})
vim.keymap.set('n', '<leader>fp', '<Plug>RestNvimPreview', {
vim.keymap.set("n", "<leader>fp", "<Plug>RestNvimPreview", {
buffer = true,
})
vim.keymap.set('n', '<leader>fl', '<Plug>RestNvimLast', {
vim.keymap.set("n", "<leader>fl", "<Plug>RestNvimLast", {
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,
})
vim.keymap.set('n', '<ledaer>fgv', ':Neorg gtd views<CR>', {
vim.keymap.set("n", "<ledaer>fgv", ":Neorg gtd views<CR>", {
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,
})
vim.keymap.set('v', '<leader>fe', '<Plug>(sqls-execute-query)', {
vim.keymap.set("v", "<leader>fe", "<Plug>(sqls-execute-query)", {
buffer = true,
})
vim.keymap.set('n', '<leader>fsd', ':SqlsSwitchDatabase<CR>', {
vim.keymap.set("n", "<leader>fsd", ":SqlsSwitchDatabase<CR>", {
buffer = true,
})
vim.keymap.set('n', '<leader>fsc', ':SqlsSwitchConnection<CR>', {
vim.keymap.set("n", "<leader>fsc", ":SqlsSwitchConnection<CR>", {
buffer = true,
})

View File

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

View File

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

View File

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

View File

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

View File

@ -1,22 +1,22 @@
local M = {}
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 = {
'neo-tree',
'dashboard',
'alpha',
"neo-tree",
"dashboard",
"alpha",
}
for _, ft in ipairs(ignore_fts) do
if ft == vim.bo.filetype then
return win_number .. ' ' .. ft
return win_number .. " " .. ft
end
end
local relative_path = vim.fn.fnamemodify(vim.fn.expand('%:h'), ':p:~:.')
local filename = vim.fn.expand('%:t')
return win_number .. '' .. relative_path .. filename
local relative_path = vim.fn.fnamemodify(vim.fn.expand("%:h"), ":p:~:.")
local filename = vim.fn.expand("%:t")
return win_number .. "" .. relative_path .. filename
end
M.setup = function()

View File

@ -4,13 +4,13 @@
-- INFO: SHOULD have a init.lua file associated with them.
-- INFO: init.lua is responsible for loading all configuration
-- INFO: related to that directory.
require('core.init')
require('plugins.init')
require("core.init")
require("plugins.init")
-- 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: rely on each other's load order. That type of logic should be shifted
-- NOTE: into non-postload regions then handled in postload modules.
require('plugins.postload')
require('core.postload')
require("plugins.postload")
require("core.postload")

View File

@ -1,39 +1,39 @@
local neorg = require('neorg')
local neorg = require("neorg")
neorg.setup({
load = {
['core.defaults'] = {},
['core.norg.concealer'] = {},
['core.norg.esupports.metagen'] = {
["core.defaults"] = {},
["core.norg.concealer"] = {},
["core.norg.esupports.metagen"] = {
config = {
type = 'auto',
type = "auto",
},
},
['core.integrations.nvim-cmp'] = {
["core.integrations.nvim-cmp"] = {
config = {},
},
['core.norg.completion'] = {
["core.norg.completion"] = {
config = {
engine = 'nvim-cmp',
engine = "nvim-cmp",
},
},
['core.keybinds'] = {
["core.keybinds"] = {
config = {
default_keybinds = true,
-- norg_leader = "-"
},
},
['core.norg.dirman'] = {
["core.norg.dirman"] = {
config = {
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
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
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
},
},
['core.integrations.telescope'] = {},
['core.norg.qol.toc'] = {},
["core.integrations.telescope"] = {},
["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
force = true,
-- set context mark to register on force event which can be jumped to with '<forcemark>
forcemark = nil,
-- do not manage windows matching these file/buftypes
ignore = {
filetype = { 'packer', 'Dashboard', 'Trouble', 'TelescopePrompt' },
filetype = { "packer", "Dashboard", "Trouble", "TelescopePrompt" },
buftype = {
'packer',
'Dashboard',
'terminal',
'quickfix',
'loclist',
'LspInstall',
"packer",
"Dashboard",
"terminal",
"quickfix",
"loclist",
"LspInstall",
},
},
-- comma-separated list of autocmds that wil trigger the plugins window restore function

View File

@ -1,9 +1,9 @@
local fn = vim.fn
require('dapui').setup({})
require("dapui").setup({})
fn.sign_define('DapBreakpoint', { text = '', texthl = 'DiagnosticSignError', linehl = '', numhl = '' })
fn.sign_define('DapBreakpointCondition', { text = '', texthl = 'DiagnosticSignWarn', linehl = '', numhl = '' })
fn.sign_define('DapLogPoint', { text = '', texthl = 'DiagnosticSignInfo', linehl = '', numhl = '' })
fn.sign_define('DapStopped', { text = '', texthl = 'DiagnosticSignWarn', linehl = '', numhl = '' })
fn.sign_define('DapBreakpointReject', { text = '', texthl = 'DiagnosticSignHint', linehl = '', numhl = '' })
fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
fn.sign_define("DapBreakpointCondition", { text = "", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" })
fn.sign_define("DapLogPoint", { text = "", texthl = "DiagnosticSignInfo", linehl = "", numhl = "" })
fn.sign_define("DapStopped", { text = "", texthl = "DiagnosticSignWarn", 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({
highlight = {
@ -6,8 +6,8 @@ nvim_tree.setup({
additional_vim_regex_highlighting = true,
disable = {
-- Ansible support reasons
'ansible.yaml',
'yaml.ansible'
"ansible.yaml",
"yaml.ansible",
},
},
matchup = {

View File

@ -1,14 +1,13 @@
local hydra = require("hydra")
local wk = require("which-key")
wk.register(
{ h = {
wk.register({
h = {
name = "Hydra",
o = { "Options" },
g = { "Git Signs" },
d = { "Diagram" },
} },
{ prefix = "<leader>" }
)
},
}, { prefix = "<leader>" })
-- Side Scroll
hydra({
@ -135,7 +134,7 @@ hydra({
^ ^ _K_ ^ ^ _f_: surround it with box
_H_ ^ ^ _L_
^ ^ _J_ ^ ^ _<Esc>_
]] ,
]],
config = {
color = "pink",
invoke_on_body = true,
@ -174,7 +173,7 @@ hydra({
_r_ %{rnu} relative number
^
^^^^ _<Esc>_
]] ,
]],
config = {
color = "amaranth",
invoke_on_body = true,

View File

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

View File

@ -120,7 +120,7 @@ require("kanagawa").setup({
NoiceCmdlinePopupdBorderIncRename = { fg = colors.peachRed },
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" },
root_dir = vim.fn.getcwd(),
capabilities = lsp_capabilities,
on_attach = on_attach
on_attach = on_attach,
})
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({
sources = {
null_ls.builtins.formatting.shfmt.with({
extra_args = { '-i 4' },
extra_args = { "-i 4" },
}),
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.code_actions.shellcheck,

View File

@ -22,7 +22,7 @@ local handler = function(virtText, lnum, endLnum, width, truncate)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, {chunkText, hlGroup})
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
@ -32,13 +32,13 @@ local handler = function(virtText, lnum, endLnum, width, truncate)
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, {suffix, "@conditional"})
table.insert(newVirtText, { suffix, "@conditional" })
return newVirtText
end
require("ufo").setup({
provider_selector = function(bufnr, filetype, buftype)
return {"treesitter", "indent"}
return { "treesitter", "indent" }
end,
fold_virt_text_handler = handler
fold_virt_text_handler = handler,
})

View File

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

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({
useDefaultKeymaps = true
useDefaultKeymaps = true,
})
end,
},

View File

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