From c69a88e20f60efdf4dabd4472b88aaa404cb5982 Mon Sep 17 00:00:00 2001 From: servostar Date: Fri, 8 Nov 2024 18:22:53 +0100 Subject: [PATCH] style: formatted lua source --- init.lua | 1 - lua/config/icons.lua | 1 - lua/config/keys.lua | 2 -- lua/config/lazy.lua | 43 +++++++++++++-------------- lua/config/opts.lua | 6 ++-- lua/config/ui.lua | 1 - lua/plugins/barbar.lua | 8 ++--- lua/plugins/cellular-automaton.lua | 2 -- lua/plugins/dressing.lua | 11 ++++--- lua/plugins/gitsigns.lua | 1 - lua/plugins/indent-blankline.lua | 1 - lua/plugins/mini.lua | 1 - lua/plugins/neo-tree.lua | 47 +++++++++++++++--------------- lua/plugins/nvim-lspconfig.lua | 4 +-- lua/plugins/nvim-notify.lua | 1 - lua/plugins/nvim-treesitter.lua | 3 +- lua/plugins/satellite.lua | 1 - lua/plugins/twilight.lua | 1 - lua/plugins/vim-illuminate.lua | 1 - 19 files changed, 57 insertions(+), 79 deletions(-) diff --git a/init.lua b/init.lua index c3fecfc..4b51cd9 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,3 @@ - -- -- Initialize Neovim configuration -- .............................................. diff --git a/lua/config/icons.lua b/lua/config/icons.lua index 4c99f1e..72861d9 100644 --- a/lua/config/icons.lua +++ b/lua/config/icons.lua @@ -1,4 +1,3 @@ - -- -- Icons -- diff --git a/lua/config/keys.lua b/lua/config/keys.lua index 63cc455..4decce1 100644 --- a/lua/config/keys.lua +++ b/lua/config/keys.lua @@ -1,4 +1,3 @@ - -- -- Global custom plugin agnostic keymaps -- .............................................. @@ -88,7 +87,6 @@ local keymaps = { local file_type = vim.api.nvim_buf_get_option(buf, 'filetype') if buf_type == '' then - -- check if buffer is in ignore in_ignore = false for _, v in ipairs(ignore) do diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 5703580..cbf6e02 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,4 +1,3 @@ - -- -- Bootstrap and start Lazy.nvim plugins -- manager. @@ -17,17 +16,17 @@ -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) @@ -50,16 +49,16 @@ require("config.opts") -- Setup lazy.nvim require("lazy").setup({ - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = false }, - rtp = { + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = false }, + rtp = { disabled_plugins = { "gzip", "matchit", diff --git a/lua/config/opts.lua b/lua/config/opts.lua index 10b80b6..9182d1f 100644 --- a/lua/config/opts.lua +++ b/lua/config/opts.lua @@ -1,4 +1,3 @@ - -- -- Neovim and VIM global configuration -- and options @@ -26,11 +25,11 @@ opt.mouse = "a" opt.shiftwidth = 4 opt.tabstop = 4 opt.showmode = false -opt.termguicolors = true -- True color support +opt.termguicolors = true -- True color support opt.virtualedit = "block" -- Allow cursor to move where there is no text in visual block mode opt.wrap = false opt.smoothscroll = true -opt.swapfile = false -- disable swapfiles because they are fucking garbage +opt.swapfile = false -- disable swapfiles because they are fucking garbage opt.smartindent = true -- @@ -41,4 +40,3 @@ opt.smartindent = true vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.inlay_hints_visible = true - diff --git a/lua/config/ui.lua b/lua/config/ui.lua index d0301eb..d68a8cb 100644 --- a/lua/config/ui.lua +++ b/lua/config/ui.lua @@ -1,4 +1,3 @@ - -- -- User interface configuration -- diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua index 7d77adc..1295424 100644 --- a/lua/plugins/barbar.lua +++ b/lua/plugins/barbar.lua @@ -2,8 +2,8 @@ return { { 'romgrk/barbar.nvim', dependencies = { - 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status - 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons + 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status + 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons }, init = function() vim.g.barbar_auto_setup = false @@ -12,9 +12,9 @@ return { auto_hide = 1, tabpages = true, clickable = true, - -- Set the filetypes which barbar will offset itself for + -- Set the filetypes which barbar will offset itself for sidebar_filetypes = { - ['neo-tree'] = {event = 'BufWipeout'} + ['neo-tree'] = { event = 'BufWipeout' } } }, version = '^1.0.0' diff --git a/lua/plugins/cellular-automaton.lua b/lua/plugins/cellular-automaton.lua index ade8b10..b9d96e3 100644 --- a/lua/plugins/cellular-automaton.lua +++ b/lua/plugins/cellular-automaton.lua @@ -1,5 +1,3 @@ - - -- -- Global custom plugin agnostic keymaps -- diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua index fe4ba00..7b2afaf 100644 --- a/lua/plugins/dressing.lua +++ b/lua/plugins/dressing.lua @@ -1,4 +1,3 @@ - -- -- Improve the default vim.ui interfaces -- @@ -14,16 +13,16 @@ ui = require 'config.ui' return { - { + { 'stevearc/dressing.nvim', opts = { input = { enabled = true, - border = ui.border, - trim_prompt = true, - win_options = { + border = ui.border, + trim_prompt = true, + win_options = { winhighlight = ui.winhighlight - } + } }, select = { enabled = true, diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index da3182f..4e4d07c 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,4 +1,3 @@ - -- -- Super fast git decorations implemented purely in Lua -- diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua index 3800831..748b5fc 100644 --- a/lua/plugins/indent-blankline.lua +++ b/lua/plugins/indent-blankline.lua @@ -1,4 +1,3 @@ - -- -- Identation markers -- diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 46878b1..d14e05b 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -1,4 +1,3 @@ - -- -- Mini plugin library -- diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 4fb0ca0..5b4951f 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,4 +1,3 @@ - -- -- Pretty file tree with various sources -- @@ -28,25 +27,25 @@ return { source_selector = { winbar = true, statusline = false, - sources = { - { - source = "filesystem", - display_name = " 󰉓 Files " - }, - { - source = "buffers", - display_name = " 󰈚 Buffers " - }, - { - source = "document_symbols", - display_name = " 󰊢 Git " - }, + sources = { + { + source = "filesystem", + display_name = " 󰉓 Files " + }, + { + source = "buffers", + display_name = " 󰈚 Buffers " + }, + { + source = "document_symbols", + display_name = " 󰊢 Git " + }, + }, }, - }, - filesystem = { + filesystem = { bind_to_cwd = false, - follow_current_file = { enabled = true }, - use_libuv_file_watcher = true, + follow_current_file = { enabled = true }, + use_libuv_file_watcher = true, hijack_netrw_behavior = "open_default", filtered_items = { hide_dotfiles = false, @@ -58,7 +57,7 @@ return { } }, close_if_last_window = false, - default_component_configs = { + default_component_configs = { container = { enable_character_fade = true }, @@ -68,11 +67,11 @@ return { with_markers = true, indent_marker = "│", last_indent_marker = "└", - with_expanders = true, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "", - expander_expanded = "", - expander_highlight = "NeoTreeExpander", - } + with_expanders = true, -- if nil and file nesting is enabled, will enable expanders + expander_collapsed = "", + expander_expanded = "", + expander_highlight = "NeoTreeExpander", + } } } } diff --git a/lua/plugins/nvim-lspconfig.lua b/lua/plugins/nvim-lspconfig.lua index 606cb65..ba44408 100644 --- a/lua/plugins/nvim-lspconfig.lua +++ b/lua/plugins/nvim-lspconfig.lua @@ -1,4 +1,3 @@ - -- -- Start config for builtin Neovim language server protocol client -- @@ -64,7 +63,6 @@ return { function(server_name) -- default handler (optional) require("lspconfig")[server_name].setup({ on_attach = function(client, bufnr) - -- optionally enable inlay hints -- Source: https://www.reddit.com/r/neovim/comments/14em0f8/how_to_use_the_new_lsp_inlay_hints/ -- .............................................. @@ -120,7 +118,7 @@ return { { border = ui.border }) - + vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) end } diff --git a/lua/plugins/nvim-notify.lua b/lua/plugins/nvim-notify.lua index e77c59b..82f526b 100644 --- a/lua/plugins/nvim-notify.lua +++ b/lua/plugins/nvim-notify.lua @@ -1,4 +1,3 @@ - -- -- Prettier user interface for VIM notifications. -- diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 7cde894..dcdb9d0 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,4 +1,3 @@ - -- -- Tree sitter syntax highlightning -- @@ -15,7 +14,7 @@ return { { 'nvim-treesitter/nvim-treesitter', - version = false, -- last release is way too old and doesn't work on Windows + version = false, -- last release is way too old and doesn't work on Windows build = ":TSUpdate", lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline init = function(plugin) diff --git a/lua/plugins/satellite.lua b/lua/plugins/satellite.lua index 8c21137..fe78f49 100644 --- a/lua/plugins/satellite.lua +++ b/lua/plugins/satellite.lua @@ -1,4 +1,3 @@ - -- -- Super fast git decorations implemented purely in Lua -- diff --git a/lua/plugins/twilight.lua b/lua/plugins/twilight.lua index 7f28f21..01d2b5b 100644 --- a/lua/plugins/twilight.lua +++ b/lua/plugins/twilight.lua @@ -1,4 +1,3 @@ - -- -- Dim all non active scopes using tree sitter -- diff --git a/lua/plugins/vim-illuminate.lua b/lua/plugins/vim-illuminate.lua index 4334718..78112c5 100644 --- a/lua/plugins/vim-illuminate.lua +++ b/lua/plugins/vim-illuminate.lua @@ -1,4 +1,3 @@ - -- -- Mark all occurances of the word under the current cursor --