From 9a9bae1333284c4b9ad28f718b6b9490afda1bc6 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Thu, 31 Aug 2023 21:58:00 -0500 Subject: [PATCH] style(nvim): format with stylua --- dots/.config/nvim/lua/core/autocmds.lua | 3 +- dots/.config/nvim/lua/core/mappings.lua | 3 +- dots/.config/nvim/lua/plugins/configs/cmp.lua | 13 +++--- .../nvim/lua/plugins/configs/neorg.lua | 40 +++++++++---------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/dots/.config/nvim/lua/core/autocmds.lua b/dots/.config/nvim/lua/core/autocmds.lua index 54d9a959..2f3c0d9c 100644 --- a/dots/.config/nvim/lua/core/autocmds.lua +++ b/dots/.config/nvim/lua/core/autocmds.lua @@ -16,7 +16,6 @@ M.setup = function() command = "StripTrailSpace", }) - -- NOTE: Disables status column elements in Terminal buffer vim.api.nvim_create_autocmd("TermOpen", { group = augroup, @@ -26,7 +25,7 @@ M.setup = function() vim.api.nvim_set_option_value("number", false, { scope = "local" }) vim.api.nvim_set_option_value("relativenumber", false, { scope = "local" }) vim.cmd.startinsert() - end + end, }) end diff --git a/dots/.config/nvim/lua/core/mappings.lua b/dots/.config/nvim/lua/core/mappings.lua index 0911015d..09986490 100755 --- a/dots/.config/nvim/lua/core/mappings.lua +++ b/dots/.config/nvim/lua/core/mappings.lua @@ -75,8 +75,7 @@ M.setup = function() end, { silent = true, desc = "Insert Literal Tab" }) -- Binding to keep S-Space in terminals from not sending - vim.keymap.set("t", "", "", - { silent = true, desc = "Terminal: Hack S-Space to Space" }) + vim.keymap.set("t", "", "", { silent = true, desc = "Terminal: Hack S-Space to Space" }) end return M diff --git a/dots/.config/nvim/lua/plugins/configs/cmp.lua b/dots/.config/nvim/lua/plugins/configs/cmp.lua index 3bb6b9b8..0011f32e 100644 --- a/dots/.config/nvim/lua/plugins/configs/cmp.lua +++ b/dots/.config/nvim/lua/plugins/configs/cmp.lua @@ -61,13 +61,12 @@ return { end end - ---@param sources table? local standard_sources = function(sources) sources = sources or {} local default_sources = { - { name = "nvim_lsp", priority = 11 }, - { name = "luasnip", priority = 10 }, -- For luasnip users. + { name = "nvim_lsp", priority = 11 }, + { name = "luasnip", priority = 10 }, -- For luasnip users. { name = "fuzzy_buffer", priority = 9, keyword_length = 3, max_item_count = 10 }, { name = "rg", @@ -76,12 +75,12 @@ return { max_item_count = 10, }, { name = "async_path", priority = 6 }, - { name = "zsh", priority = 5 }, - { name = "emoji", keyword_length = 2 }, + { name = "zsh", priority = 5 }, + { name = "emoji", keyword_length = 2 }, { name = "neorg" }, { name = "calc" }, - { name = "npm", keyword_length = 2 }, - { name = "spell", keyword_length = 2 }, + { name = "npm", keyword_length = 2 }, + { name = "spell", keyword_length = 2 }, } return vim.tbl_deep_extend("force", default_sources, sources) diff --git a/dots/.config/nvim/lua/plugins/configs/neorg.lua b/dots/.config/nvim/lua/plugins/configs/neorg.lua index c1c4bd5b..0ba7f826 100644 --- a/dots/.config/nvim/lua/plugins/configs/neorg.lua +++ b/dots/.config/nvim/lua/plugins/configs/neorg.lua @@ -3,20 +3,20 @@ return { "3rd/image.nvim", build = function() ---@param out SystemCompleted - vim.system({"luarocks", "--lua-version", "5.1", "--local", "install", "magick"}, {}, function (out) + vim.system({ "luarocks", "--lua-version", "5.1", "--local", "install", "magick" }, {}, function(out) if out.code ~= 0 then error("Failed to install `magick` luarock for image.nvim!", vim.log.levels.ERROR) end end) end, - ft = {"markdown", "norg"}, + ft = { "markdown", "norg" }, config = function() package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;" package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;" require("image").setup({ window_overlap_clear_enabled = true, }) - end + end, }, { "nvim-neorg/neorg", @@ -24,9 +24,9 @@ return { cmd = { "Neorg" }, ft = { "norg" }, keys = { - { "o", desc = "> Neorg" }, + { "o", desc = "> Neorg" }, { "oj", ":Neorg journal custom", desc = "Neorg: Journal" }, - { "ot", ":Neorg toc", desc = "Neorg: Table of Contents" } + { "ot", ":Neorg toc", desc = "Neorg: Table of Contents" }, }, config = function() require("neorg").setup({ @@ -34,25 +34,25 @@ return { ["core.defaults"] = {}, ["core.completion"] = { config = { - engine = "nvim-cmp" - } + engine = "nvim-cmp", + }, }, ["core.neorgcmd"] = {}, ["core.summary"] = {}, ["core.journal"] = { config = { - stategy = "flat" + stategy = "flat", }, - workspace = "default" + workspace = "default", }, ["core.dirman"] = { config = { default_workspace = "default", workspaces = { - default = "~/Notes" + default = "~/Notes", }, - index = "index.norg" - } + index = "index.norg", + }, }, ["core.concealer"] = { config = { @@ -64,24 +64,24 @@ return { content_only = true, }, }, - } + }, }, ["core.integrations.treesitter"] = { config = { configure_parsers = true, - install_parsers = true - } + install_parsers = true, + }, }, ["core.qol.todo_items"] = { config = { create_todo_items = true, - create_todo_parents = true - } + create_todo_parents = true, + }, }, ["core.ui"] = {}, - ["core.ui.calendar"] = {} - } + ["core.ui.calendar"] = {}, + }, }) end, - } + }, }