# HG changeset patch # User Meredith Howard # Date 1678066335 21600 # Node ID fcfa295076a88b3dc054894c59219d8a6ab999b6 # Parent 2763a54b0410effc9c390ae45149ab687f28ae3f Apply stylua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -8,4 +8,3 @@ require("config.lsp") -- >> Builtin g.netrw_altfile = 1 g.netrw_use_errorwindow = 0 - diff --git a/.config/nvim/lua/config/lsp.lua b/.config/nvim/lua/config/lsp.lua --- a/.config/nvim/lua/config/lsp.lua +++ b/.config/nvim/lua/config/lsp.lua @@ -3,8 +3,8 @@ local diag_float_max_threshold = "INFO" vim.diagnostic.config({ severity_sort = true, - underline = { severity = {min = diag_virtual_min_threshold} }, - virtual_text = { true, severity = {min = diag_virtual_min_threshold} }, + underline = { severity = { min = diag_virtual_min_threshold } }, + virtual_text = { true, severity = { min = diag_virtual_min_threshold } }, float = { source = "if_many" }, }) @@ -27,25 +27,25 @@ vim.api.nvim_create_autocmd("LspAttach", -- enable auto diags in message area for below threshold vim.api.nvim_create_autocmd("CursorHold", { - group = vim.api.nvim_create_augroup("lsp_buf_diags", {clear = true}), + group = vim.api.nvim_create_augroup("lsp_buf_diags", { clear = true }), buffer = bufnr, callback = function(opts, bufnr, line_nr, client_id) vim.diagnostic.open_float(nil, { focusable = false, - close_events = {"BufLeave", "CursorMoved", "InsertEnter", "FocusLost"}, + close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" }, scope = "line", - severity = {max = diag_float_max_threshold}, + severity = { max = diag_float_max_threshold }, }) end, }) - end + end, }) -- Format on write, but only certain languages local autoformat_filetypes = { elixir = true, go = true } vim.api.nvim_create_autocmd("BufWritePre", { - group = vim.api.nvim_create_augroup("lsp_autoformat", {clear = true}), + group = vim.api.nvim_create_augroup("lsp_autoformat", { clear = true }), callback = function(opts, bufnr) if autoformat_filetypes[vim.bo.filetype] then vim.lsp.buf.formatting_seq_sync(nil, 100) @@ -57,15 +57,14 @@ vim.api.nvim_create_autocmd("BufWritePre if vim.fn.executable("standardrb") == 1 then vim.api.nvim_create_autocmd("FileType", { pattern = "ruby", - group = vim.api.nvim_create_augroup("lsp_ruby", {clear = true}), + group = vim.api.nvim_create_augroup("lsp_ruby", { clear = true }), once = true, callback = function() require("lspconfig").standardrb.setup({ autostart = true, - single_file_support = true + single_file_support = true, }) vim.cmd.LspStart("standardrb") end, }) end - diff --git a/.config/nvim/lua/config/maps.lua b/.config/nvim/lua/config/maps.lua --- a/.config/nvim/lua/config/maps.lua +++ b/.config/nvim/lua/config/maps.lua @@ -1,4 +1,3 @@ - local function map(mode, lhs, rhs, opts) opts = opts or {} opts.silent = opts.silent ~= false @@ -8,7 +7,7 @@ end map("n", "", ":20Lexplore") map("n", "", "n") map("n", "", "N") -map("", "", ":let v:hlsearch = !v:hlsearch") +map("", "", ":let v:hlsearch = !v:hlsearch") map("n", "", ":UndotreeToggle") map("n", "", ":TagbarToggle") @@ -36,10 +35,10 @@ map("n", "", "vertical res -- buffer switching map("n", "gb", "") -map("n", "gB", ":ls:b ", {silent = false}) +map("n", "gB", ":ls:b ", { silent = false }) -- Select last paste, in the same mode it was pasted in -map("n", "gV", "'`[' . strpart(getregtype(), 0, 1) . '`]'", {expr=true}) +map("n", "gV", "'`[' . strpart(getregtype(), 0, 1) . '`]'", { expr = true }) -- Add undo break-points map("i", ",", ",u") @@ -50,8 +49,8 @@ map("i", ";", ";u") map("v", "<", "", ">gv") -map("n", "j", "v:count == 0 ? 'gj' : 'j'", {expr = true}) -map("n", "k", "v:count == 0 ? 'gk' : 'k'", {expr = true}) +map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true }) +map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true }) -- Use ltag over tselect map("n", "g", ":exe 'ltag ' . expand('') | lopen") @@ -74,10 +73,10 @@ map("n", "tm", ":Tabularize meth map("n", "a", ":call vimrc#AutoFmtToggle()") -- LSP features -map('n', 'd', vim.diagnostic.open_float) -map('n', '[d', vim.diagnostic.goto_prev) -map('n', ']d', vim.diagnostic.goto_next) -map('n', 'ld', vim.diagnostic.setloclist) +map("n", "d", vim.diagnostic.open_float) +map("n", "[d", vim.diagnostic.goto_prev) +map("n", "]d", vim.diagnostic.goto_next) +map("n", "ld", vim.diagnostic.setloclist) vim.api.nvim_create_augroup("lsp_attach", {}) @@ -85,23 +84,24 @@ vim.api.nvim_create_autocmd("LspAttach", group = "lsp_attach", callback = function(args) local bufnr = args.buf - local bufopts = { buffer=bufnr } + local bufopts = { buffer = bufnr } - map('n', 'gD', vim.lsp.buf.declaration, bufopts) - map('n', 'gd', vim.lsp.buf.definition, bufopts) - map('n', 'K', vim.lsp.buf.hover, bufopts) - map('n', 'gi', vim.lsp.buf.implementation, bufopts) - map('n', '', vim.lsp.buf.signature_help, bufopts) - map('n', 'wa', vim.lsp.buf.add_workspace_folder, bufopts) - map('n', 'wr', vim.lsp.buf.remove_workspace_folder, bufopts) - map('n', 'wl', function() + map("n", "gD", vim.lsp.buf.declaration, bufopts) + map("n", "gd", vim.lsp.buf.definition, bufopts) + map("n", "K", vim.lsp.buf.hover, bufopts) + map("n", "gi", vim.lsp.buf.implementation, bufopts) + map("n", "", vim.lsp.buf.signature_help, bufopts) + map("n", "wa", vim.lsp.buf.add_workspace_folder, bufopts) + map("n", "wr", vim.lsp.buf.remove_workspace_folder, bufopts) + map("n", "wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts) - map('n', 'D', vim.lsp.buf.type_definition, bufopts) - map('n', 'rn', vim.lsp.buf.rename, bufopts) - map('n', 'ca', vim.lsp.buf.code_action, bufopts) - map('n', 'gr', vim.lsp.buf.references, bufopts) - map('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) + map("n", "D", vim.lsp.buf.type_definition, bufopts) + map("n", "rn", vim.lsp.buf.rename, bufopts) + map("n", "ca", vim.lsp.buf.code_action, bufopts) + map("n", "gr", vim.lsp.buf.references, bufopts) + map("n", "f", function() + vim.lsp.buf.format({ async = true }) + end, bufopts) end, }) - diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua --- a/.config/nvim/lua/config/options.lua +++ b/.config/nvim/lua/config/options.lua @@ -26,11 +26,11 @@ o.winminwidth = 5 -- Behavior o.autowriteall = true o.backup = true -o.completeopt = {"menu", "menuone", "noselect"} +o.completeopt = { "menu", "menuone", "noselect" } o.hidden = false o.ignorecase = true o.scrolloff = 15 -o.sessionoptions = {"buffers", "curdir", "localoptions"} +o.sessionoptions = { "buffers", "curdir", "localoptions" } o.sidescrolloff = 10 o.smartcase = true o.splitbelow = true @@ -40,10 +40,10 @@ o.wildignorecase = true -- Paths o.backupdir:remove(".") -o.tags:append({".tags", "./.tags;"}) +o.tags:append({ ".tags", "./.tags;" }) o.wildignore = "*~,*.o,*.pyc,.git/*,hg/*,.svn/*" if vim.fn.executable("ag") then o.grepprg = "ag --vimgrep" - o.grepformat = {"%f:%l:%c:%m", "%f"} + o.grepformat = { "%f:%l:%c:%m", "%f" } end diff --git a/.config/nvim/lua/lazy-bootstrap.lua b/.config/nvim/lua/lazy-bootstrap.lua --- a/.config/nvim/lua/lazy-bootstrap.lua +++ b/.config/nvim/lua/lazy-bootstrap.lua @@ -1,6 +1,13 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) end vim.opt.rtp:prepend(vim.env.LAZY or lazypath) @@ -13,7 +20,7 @@ require("lazy").setup({ colorscheme = "jellybeans", }, }, - { import = "plugins" } + { import = "plugins" }, }, change_detection = { enabled = false }, performance = { diff --git a/.config/nvim/lua/plugins/completion.lua b/.config/nvim/lua/plugins/completion.lua --- a/.config/nvim/lua/plugins/completion.lua +++ b/.config/nvim/lua/plugins/completion.lua @@ -34,10 +34,10 @@ return { [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({select = true}), + [""] = cmp.mapping.confirm({ select = true }), [""] = function(fallback) if cmp.visible() then - cmp.confirm({select = false}, function() + cmp.confirm({ select = false }, function() vim.api.nvim_feedkeys(" ", "n", false) end) end @@ -58,4 +58,3 @@ return { end, }, } - diff --git a/.config/nvim/lua/plugins/editing.lua b/.config/nvim/lua/plugins/editing.lua --- a/.config/nvim/lua/plugins/editing.lua +++ b/.config/nvim/lua/plugins/editing.lua @@ -15,10 +15,20 @@ g.tagbar_width = 30 -- >> interestingwords -- These are jellybeans colors and some complements g.interestingWordsGUIColors = { - '#C4A258','#6AADA0', '#71B9F8', '#A037B0', '#CF6A4C', '#D8AD4C', + "#C4A258", + "#6AADA0", + "#71B9F8", + "#A037B0", + "#CF6A4C", + "#D8AD4C", } g.interestingWordsTermColors = { - '179', '73', '75', '133', '167', '136', + "179", + "73", + "75", + "133", + "167", + "136", } return { @@ -28,16 +38,16 @@ return { "tomtom/tcomment_vim", "tpope/vim-endwise", "godlygeek/tabular", - {"mbbill/undotree", cmd = "UndotreeToggle"}, + { "mbbill/undotree", cmd = "UndotreeToggle" }, "tpope/vim-vinegar", "lfv89/vim-interestingwords", "kshenoy/vim-signature", - {"majutsushi/tagbar", cmd = "TagbarToggle"}, + { "majutsushi/tagbar", cmd = "TagbarToggle" }, { "RRethy/vim-illuminate", - event = {"BufReadPost", "BufNewFile"}, + event = { "BufReadPost", "BufNewFile" }, opts = { delay = 250, large_file_cutoff = 15000, diff --git a/.config/nvim/lua/plugins/etc.lua b/.config/nvim/lua/plugins/etc.lua --- a/.config/nvim/lua/plugins/etc.lua +++ b/.config/nvim/lua/plugins/etc.lua @@ -1,20 +1,24 @@ local g = vim.g -g.vimwiki_auto_chdir = 1 +g.vimwiki_auto_chdir = 1 g.vimwiki_auto_header = 1 -g.vimwiki_ext2syntax = {[vim.type_idx]=vim.types.dictionary} +g.vimwiki_ext2syntax = { [vim.type_idx] = vim.types.dictionary } g.vimwiki_list = { { - path = '~/vimwiki/', - auto_tags = 1, auto_toc = 1, automatic_nested_syntaxes = 1 + path = "~/vimwiki/", + auto_tags = 1, + auto_toc = 1, + automatic_nested_syntaxes = 1, }, { - path = '~/Documents/SpiderOak Hive/vimwiki', - auto_tags = 1, auto_toc = 1, automatic_nested_syntaxes = 1 - } + path = "~/Documents/SpiderOak Hive/vimwiki", + auto_tags = 1, + auto_toc = 1, + automatic_nested_syntaxes = 1, + }, } return { - 'vimwiki/vimwiki', + "vimwiki/vimwiki", } diff --git a/.config/nvim/lua/plugins/filetype.lua b/.config/nvim/lua/plugins/filetype.lua --- a/.config/nvim/lua/plugins/filetype.lua +++ b/.config/nvim/lua/plugins/filetype.lua @@ -8,30 +8,30 @@ g.perl_compiler_force_warnings = 0 return { { - 'nvim-treesitter/nvim-treesitter', + "nvim-treesitter/nvim-treesitter", build = function() - require('nvim-treesitter.install').update({ with_sync = true }) + require("nvim-treesitter.install").update({ with_sync = true }) end, config = function() - require('nvim-treesitter.configs').setup({ + require("nvim-treesitter.configs").setup({ highlight = { enable = true }, indent = { enable = true }, ensure_installed = { - 'c', - 'comment', - 'eex', - 'elixir', - 'heex', - 'help', - 'lua', - 'surface', - 'vim', + "c", + "comment", + "eex", + "elixir", + "heex", + "help", + "lua", + "surface", + "vim", }, }) end, }, - 'Shougo/vinarise.vim', - 'asciidoc/vim-asciidoc', - {'vim-perl/vim-perl', branch = 'dev'}, - 'yko/mojo.vim', + "Shougo/vinarise.vim", + "asciidoc/vim-asciidoc", + { "vim-perl/vim-perl", branch = "dev" }, + "yko/mojo.vim", } diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -1,7 +1,7 @@ return { "neovim/nvim-lspconfig", - {"williamboman/mason.nvim", config = true}, - {"j-hui/fidget.nvim", config = true}, + { "williamboman/mason.nvim", config = true }, + { "j-hui/fidget.nvim", config = true }, { "williamboman/mason-lspconfig.nvim", @@ -10,19 +10,19 @@ return { require("mason-lspconfig").setup_handlers({ function(server) require("lspconfig")[server].setup({ - capabilities = require('cmp_nvim_lsp').default_capabilities() + capabilities = require("cmp_nvim_lsp").default_capabilities(), }) end, - gopls = function () + gopls = function() require("lspconfig").gopls.setup({ - capabilities = require('cmp_nvim_lsp').default_capabilities(), - settings = { gopls = { gofumpt = true } } + capabilities = require("cmp_nvim_lsp").default_capabilities(), + settings = { gopls = { gofumpt = true } }, }) end, - solargraph = function () + solargraph = function() require("lspconfig").solargraph.setup({ - capabilities = require('cmp_nvim_lsp').default_capabilities(), - init_options = { formatting = false } + capabilities = require("cmp_nvim_lsp").default_capabilities(), + init_options = { formatting = false }, }) end, }) diff --git a/.config/nvim/lua/plugins/ui.lua b/.config/nvim/lua/plugins/ui.lua --- a/.config/nvim/lua/plugins/ui.lua +++ b/.config/nvim/lua/plugins/ui.lua @@ -18,26 +18,26 @@ return { component_separators = "", }, sections = { - lualine_a = {'mode'}, - lualine_b = {'filename'}, - lualine_c = {'diagnostics'}, - lualine_x = {'encoding', 'fileformat'}, - lualine_y = {'filetype'}, - lualine_z = {'progress', 'location'} + lualine_a = { "mode" }, + lualine_b = { "filename" }, + lualine_c = { "diagnostics" }, + lualine_x = { "encoding", "fileformat" }, + lualine_y = { "filetype" }, + lualine_z = { "progress", "location" }, }, tabline = { - lualine_a = { {'buffers', mode = 4, show_filename_only = false} }, - lualine_z = { 'branch' }, + lualine_a = { { "buffers", mode = 4, show_filename_only = false } }, + lualine_z = { "branch" }, }, - extensions = {"quickfix"}, - } + extensions = { "quickfix" }, + }, }, { "lukas-reineke/indent-blankline.nvim", event = "BufReadPost", keys = { - {"ig", "IndentBlanklineToggle"}, + { "ig", "IndentBlanklineToggle" }, }, opts = { enabled = false, @@ -57,7 +57,9 @@ return { -- symbol = "▏", options = { try_as_border = true }, draw = { - animation = function() return 2 end, + animation = function() + return 2 + end, }, }, config = function(_, opts) diff --git a/.config/stylua.toml b/.config/stylua.toml deleted file mode 100644 --- a/.config/stylua.toml +++ /dev/null @@ -1,2 +0,0 @@ -indent_type = "Spaces" -indent_width = 2