diff --git a/init.lua b/init.lua index c5b7da2..9119d6a 100644 --- a/init.lua +++ b/init.lua @@ -1,7 +1,7 @@ -require('bootstrap') +require("bootstrap") -- load options -local options = require('options') +local options = require("options") -- set neovim options for k, v in pairs(options.vim) do @@ -16,7 +16,7 @@ if not status then end -- apply keymap -local keymap = require('keymap') +local keymap = require("keymap") for _, v in pairs(keymap) do vim.keymap.set(v[1], v[2], v[3], v[4]) end diff --git a/lua/bootstrap.lua b/lua/bootstrap.lua index 310980c..2772c99 100644 --- a/lua/bootstrap.lua +++ b/lua/bootstrap.lua @@ -17,22 +17,22 @@ local options = require("options") require("lazy").setup({ spec = { { - import = "plugins" - } + import = "plugins", + }, }, install = { missing = options.lazy.install_missing, colorscheme = { - options.ui.theme - } + options.ui.theme, + }, }, ui = { size = { - width = options.ui.popup.width, - height = options.ui.popup.height - }, - border = options.ui.border, - wrap = true, + width = options.ui.popup.width, + height = options.ui.popup.height, + }, + border = options.ui.border, + wrap = true, icons = options.lazy.icons, - } + }, }) diff --git a/lua/keymap.lua b/lua/keymap.lua index 0257e45..0ccfe94 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -1,66 +1,128 @@ return { { - { 'i', 'x', 'n', 's' }, "", "w", { desc = "Save file" } + { "i", "x", "n", "s" }, + "", + "w", + { desc = "Save file" }, }, { - { 'n' }, "", "enew", { desc = "New File" } + { "n" }, + "", + "enew", + { desc = "New File" }, }, { - { 'n', 'i' }, '', 'u', { desc = "Undo" } + { "n", "i" }, + "", + "u", + { desc = "Undo" }, }, { - { 'n', 'i' }, '', 'redo', { desc = "Undo" } + { "n", "i" }, + "", + "redo", + { desc = "Undo" }, }, { - { 'n', 'i' }, '', '<', { desc = "Remove Tab" } + { "n", "i" }, + "", + "<", + { desc = "Remove Tab" }, }, { - { 'n', 'i' }, '', 'Telescope', { desc = "Open Telescope" } + { "n", "i" }, + "", + "Telescope", + { desc = "Open Telescope" }, }, { - { 'n', 'i' }, '', '', { desc = "Scroll sideways" } + { "n", "i" }, + "", + "", + { desc = "Scroll sideways" }, }, { - { 'n', 'i' }, '', '', { desc = "Scroll sideways" } + { "n", "i" }, + "", + "", + { desc = "Scroll sideways" }, }, { - { 'n' }, "", "BufferPrevious", { desc = "Next Tab", silent = false } + { "n" }, + "", + "BufferPrevious", + { desc = "Next Tab", silent = false }, }, { - { 'n' }, "", "BufferNext", { desc = "Previous Tab", silent = false } + { "n" }, + "", + "BufferNext", + { desc = "Previous Tab", silent = false }, }, { - { 'n' }, '', '', { desc = "Disable STRG+w" } + { "n" }, + "", + "", + { desc = "Disable STRG+w" }, }, { - { 'n' }, 'v', 'vsplit', { desc = "Split Vertical", noremap = true } + { "n" }, + "v", + "vsplit", + { desc = "Split Vertical", noremap = true }, }, { - { 'n' }, 'h', 'split', { desc = "Split Horizontal", noremap = true } + { "n" }, + "h", + "split", + { desc = "Split Horizontal", noremap = true }, }, { - { 'n' }, 'q', 'BufferClose', { desc = "Quit Window" } + { "n" }, + "q", + "BufferClose", + { desc = "Quit Window" }, }, { - { 'n' }, '', 'wincmd h', { desc = "Window Left" } + { "n" }, + "", + "wincmd h", + { desc = "Window Left" }, }, { - { 'n' }, '', 'wincmd j', { desc = "Window Down" } + { "n" }, + "", + "wincmd j", + { desc = "Window Down" }, }, { - { 'n' }, '', 'wincmd k', { desc = "Window Up" } + { "n" }, + "", + "wincmd k", + { desc = "Window Up" }, }, { - { 'n' }, '', 'wincmd l', { desc = "Window Right" } + { "n" }, + "", + "wincmd l", + { desc = "Window Right" }, }, { - { 'n', 'i' }, '', 'NvimTreeToggle', { desc = "Toggle Neotree" } + { "n", "i" }, + "", + "NvimTreeToggle", + { desc = "Toggle Neotree" }, }, { - { 'n' }, ':', 'Telescope cmdline', { noremap = true, desc = "Open Cmdline" } + { "n" }, + ":", + "Telescope cmdline", + { noremap = true, desc = "Open Cmdline" }, }, { - { 'n' }, '', 'Telescope cmdline', { noremap = true, desc = "Open Cmdline" } - } + { "n" }, + "", + "Telescope cmdline", + { noremap = true, desc = "Open Cmdline" }, + }, } - diff --git a/lua/options.lua b/lua/options.lua index d2caa27..9d2b7f1 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -1,24 +1,24 @@ return { vim = { - swapfile = false, -- disable swap files cuz they are garbage - clipboard = "unnamedplus", -- Sync with system clipboard - expandtab = true, -- spaces instead of tabs - shiftwidth = 4, -- tab width in spaces - tabstop = 4, -- Number of spaces tabs count for + swapfile = false, -- disable swap files cuz they are garbage + clipboard = "unnamedplus", -- Sync with system clipboard + expandtab = true, -- spaces instead of tabs + shiftwidth = 4, -- tab width in spaces + tabstop = 4, -- Number of spaces tabs count for completeopt = "menu,menuone,noselect", - confirm = true, -- Confirm to save changes before exiting modified buffer - cursorline = true, -- Enable highlighting of the current line - ignorecase = true, -- Ignore case - mouse = "a", -- Enable mouse mode - number = true, -- Print line number - pumblend = 0, -- Popup pseudo transparency - pumheight = 12, -- Popup height - showmode = false, -- Dont show mode since we have a statusline - smartindent = true, -- Insert indents automatically - termguicolors = true, -- True color support - virtualedit = "block", -- Allow cursor to move where there is no text in visual block mode + confirm = true, -- Confirm to save changes before exiting modified buffer + cursorline = true, -- Enable highlighting of the current line + ignorecase = true, -- Ignore case + mouse = "a", -- Enable mouse mode + number = true, -- Print line number + pumblend = 0, -- Popup pseudo transparency + pumheight = 12, -- Popup height + showmode = false, -- Dont show mode since we have a statusline + smartindent = true, -- Insert indents automatically + termguicolors = true, -- True color support + virtualedit = "block", -- Allow cursor to move where there is no text in visual block mode wrap = false, - foldcolumn = '1', + foldcolumn = "1", foldlevel = 99, foldlevelstart = 99, foldenable = true, @@ -27,33 +27,33 @@ return { foldclose = "", fold = " ", foldsep = " ", - diff = "╱", + diff = "╱", eob = " ", - horiz = '─', - horizup = '─', - horizdown = '─', - vert = '▎', - vertleft = '▎', - vertright = '▎', - verthoriz = '▎', + horiz = "─", + horizup = "─", + horizdown = "─", + vert = "▎", + vertleft = "▎", + vertright = "▎", + verthoriz = "▎", }, mousemoveevent = true, - laststatus = 3, -- global statusline + laststatus = 3, -- global statusline }, ui = { theme = "vscode", border = "rounded", popup = { width = 0.6, - height = 0.8 - } + height = 0.8, + }, }, lsp = { icons = { Error = " ", - Warn = " ", - Hint = " ", - Info = " ", + Warn = " ", + Hint = " ", + Info = " ", }, }, git = { @@ -63,7 +63,7 @@ return { delete = "", topdelete = "", changedelete = "│", - untracked = "│" + untracked = "│", }, }, lazy = { diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua index 7396e6e..4afc472 100644 --- a/lua/plugins/barbar.lua +++ b/lua/plugins/barbar.lua @@ -1,32 +1,35 @@ return { { - 'romgrk/barbar.nvim', - init = function() vim.g.barbar_auto_setup = false end, - opts = function () - local options = require('options') - return { - animation = true, - tabpages = true, - insert_at_end = true, - maximum_padding = 4, - sidebar_filetypes = { - NvimTree = true, - }, - clickable = true, - pinned = { - button = '', - filename = true - }, - icons = { - separator = {left = '▎', right = ''}, - diagnostics = { - [vim.diagnostic.severity.ERROR] = {enabled = true, icon = options.lsp.icons.Error}, - [vim.diagnostic.severity.WARN] = {enabled = false, icon = options.lsp.icons.Warn}, - [vim.diagnostic.severity.INFO] = {enabled = false, icon = options.lsp.icons.Info}, - [vim.diagnostic.severity.HINT] = {enabled = true}, icon = options.lsp.icons.Hint}, + "romgrk/barbar.nvim", + init = function() + vim.g.barbar_auto_setup = false + end, + opts = function() + local options = require("options") + return { + animation = true, + tabpages = true, + insert_at_end = true, + maximum_padding = 4, + sidebar_filetypes = { + NvimTree = true, + }, + clickable = true, + pinned = { + button = "", + filename = true, + }, + icons = { + separator = { left = "▎", right = "" }, + diagnostics = { + [vim.diagnostic.severity.ERROR] = { enabled = true, icon = options.lsp.icons.Error }, + [vim.diagnostic.severity.WARN] = { enabled = false, icon = options.lsp.icons.Warn }, + [vim.diagnostic.severity.INFO] = { enabled = false, icon = options.lsp.icons.Info }, + [vim.diagnostic.severity.HINT] = { enabled = true }, + icon = options.lsp.icons.Hint, + }, + }, } - } - end - } + end, + }, } - diff --git a/lua/plugins/blankline.lua b/lua/plugins/blankline.lua index 6df7a3c..b4dd851 100644 --- a/lua/plugins/blankline.lua +++ b/lua/plugins/blankline.lua @@ -23,7 +23,6 @@ return { "lazyterm", }, }, - } + }, }, } - diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index c862154..6186b20 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -1,90 +1,90 @@ return { { - 'hrsh7th/nvim-cmp', + "hrsh7th/nvim-cmp", dependencies = { -- extra completion plugins - 'hrsh7th/cmp-cmdline', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-calc', - 'hrsh7th/cmp-emoji', - 'kdheepak/cmp-latex-symbols', + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-path", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-calc", + "hrsh7th/cmp-emoji", + "kdheepak/cmp-latex-symbols", -- snippets - 'saadparwaiz1/cmp_luasnip', - 'L3MON4D3/LuaSnip', - 'onsails/lspkind.nvim' + "saadparwaiz1/cmp_luasnip", + "L3MON4D3/LuaSnip", + "onsails/lspkind.nvim", }, config = function(_, _) - local cmp = require("cmp"); + local cmp = require("cmp") cmp.setup({ window = { completion = { border = "single", scrollbar = false, - winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None" + winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None", }, documentation = { border = "single", scrollbar = false, - winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None" + winhighlight = "Normal:CmpPmenu,FloatBorder:FloatBorder,Search:None", }, }, snippet = { expand = function(args) - require('luasnip').lsp_expand(args.body) + require("luasnip").lsp_expand(args.body) end, }, completion = { - preselect = 'none', + preselect = "none", completeopt = "menu,menuone,noinser", }, sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'nvim_lsp_signature_help' }, - { name = 'vsnip' }, - { name = 'buffer' }, + { name = "nvim_lsp" }, + { name = "nvim_lsp_signature_help" }, + { name = "vsnip" }, + { name = "buffer" }, { name = "path" }, - { name = 'calc' }, + { name = "calc" }, }, { - { name = 'emoji' }, + { name = "emoji" }, { name = "cmdline" }, - { name = "latex_symbols" } + { name = "latex_symbols" }, }), mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), [""] = cmp.mapping({ - i = function(fallback) - if cmp.visible() and cmp.get_active_entry() then - cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) - else - fallback() - end - end, - s = cmp.mapping.confirm({ select = true }), - c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), - }), + i = function(fallback) + if cmp.visible() and cmp.get_active_entry() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) + else + fallback() + end + end, + s = cmp.mapping.confirm({ select = true }), + c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), + }), }), formatting = { fields = { "kind", "abbr", "menu" }, format = function(entry, item) - local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, item) + local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, item) local strings = vim.split(kind.kind, "%s", { trimempty = true }) kind.kind = (strings[1] or "") .. " " kind.menu = " (" .. (strings[2] or "") .. ")" return kind - end + end, }, experimental = { - ghost_text = { - hl_group = "NonText", - }, - }, + ghost_text = { + hl_group = "NonText", + }, + }, }) - end - } + end, + }, } diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua new file mode 100644 index 0000000..3e4da27 --- /dev/null +++ b/lua/plugins/conform.lua @@ -0,0 +1,19 @@ +return { + { + "stevearc/conform.nvim", + opts = { + format_on_save = { + -- These options will be passed to conform.format() + timeout_ms = 500, + lsp_fallback = true, + }, + formatters = { + injected = { options = { ignore_errors = true } }, + }, + formatters_by_ft = { + lua = { "stylua" }, + sh = { "shfmt" }, + }, + }, + }, +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index bbf8fdc..08c1048 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -2,7 +2,7 @@ return { { "lewis6991/gitsigns.nvim", opts = function() - local options = require('options') + local options = require("options") return { signs = { add = { text = options.git.icons.add }, @@ -14,11 +14,9 @@ return { }, signcolumn = true, preview_config = { - border = 'rounded' + border = "rounded", }, - } - end - } + end, + }, } - diff --git a/lua/plugins/illuminate.lua b/lua/plugins/illuminate.lua index a6c29cf..dcae8e2 100644 --- a/lua/plugins/illuminate.lua +++ b/lua/plugins/illuminate.lua @@ -1,10 +1,8 @@ return { { "RRethy/vim-illuminate", - config = function (_, _) - require('illuminate').configure({ - - }) - end - } + config = function(_, _) + require("illuminate").configure({}) + end, + }, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 7d41007..8a2edaf 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -3,27 +3,27 @@ return { "neovim/nvim-lspconfig", dependencies = { "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim" + "williamboman/mason-lspconfig.nvim", }, opts = { diagnostics = { - underline = true, - update_in_insert = true, - virtual_text = { - spacing = 4, - source = "if_many", - prefix = "●", - }, - severity_sort = true, - signs = { - text = { - [vim.diagnostic.severity.ERROR] = require("options").lsp.icons.Error, - [vim.diagnostic.severity.WARN] = require("options").lsp.icons.Warn, - [vim.diagnostic.severity.HINT] = require("options").lsp.icons.Hint, - [vim.diagnostic.severity.INFO] = require("options").lsp.icons.Info, - }, - }, - }, + underline = true, + update_in_insert = true, + virtual_text = { + spacing = 4, + source = "if_many", + prefix = "●", + }, + severity_sort = true, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = require("options").lsp.icons.Error, + [vim.diagnostic.severity.WARN] = require("options").lsp.icons.Warn, + [vim.diagnostic.severity.HINT] = require("options").lsp.icons.Hint, + [vim.diagnostic.severity.INFO] = require("options").lsp.icons.Info, + }, + }, + }, }, config = function(_, opts) local options = require("options") @@ -32,10 +32,10 @@ return { local handlers = { -- The first entry (without a key) will be the default handler - -- and will be called for each installed server that doesn't have + -- and will be called for each installed server that doesn't have -- a dedicated handler. - function (server_name) -- default handler (optional) - require("lspconfig")[server_name].setup {} + function(server_name) -- default handler (optional) + require("lspconfig")[server_name].setup({}) end, } @@ -48,8 +48,8 @@ return { end vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) - - require'lspconfig'.gdscript.setup{} - end - } + + require("lspconfig").gdscript.setup({}) + end, + }, } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index dedb3ac..a816060 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -2,132 +2,131 @@ return { { "nvim-lualine/lualine.nvim", opts = function() - local options = require('options') + local options = require("options") return { - options = { - theme = "vscode", - component_separators = { left = '', right = '' }, - section_separators = { left = '', right = '' }, - globalstatus = true - }, - sections = { - lualine_a = { - { - function () - return ' ' - end, - separator = { left = '', right = '' }, - padding = 1, - fmt = function (text) - return string.gsub(text, "%s+", "") - end - }, - { - 'mode', - padding = 0, - fmt = function (text) - return string.gsub(text, "%s+", "") .. ' ' - end - } + options = { + theme = "vscode", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + globalstatus = true, }, - lualine_b = { - { - 'filename', - symbols = { - modified = '', -- Text to show when the file is modified. - readonly = '', -- Text to show when the file is non-modifiable or readonly. - unnamed = '', -- Text to show for unnamed buffers. - newfile = '[New]', -- Text to show for newly created file before first write - } - } - }, - lualine_c = { - { - 'branch', - icon = '󰊤' - }, - { - 'diff', - symbols = { - added = '+', - modified = '~', - removed = '-', + sections = { + lualine_a = { + { + function() + return " " + end, + separator = { left = "", right = "" }, + padding = 1, + fmt = function(text) + return string.gsub(text, "%s+", "") + end, }, - on_click = function () - vim.defer_fn(function() - vim.cmd("Gitsigns diffthis") - end, 100) - end, - }, - }, - lualine_x = { - { - function () - local client_id = vim.lsp.get_client_by_id(1) - return ' LSP ~ ' .. client_id.name - end, - on_click = function () - vim.defer_fn(function() - vim.cmd("LspInfo") - end, 100) - end, - color = 'lualine_c_inactive' - }, - { - 'diagnostics', - symbols = { - error = options.lsp.icons.Error, - warn = options.lsp.icons.Warn, - info = options.lsp.icons.Info, - hint = options.lsp.icons.Hint, + { + "mode", + padding = 0, + fmt = function(text) + return string.gsub(text, "%s+", "") .. " " + end, }, - sources = { - 'nvim_diagnostic' + }, + lualine_b = { + { + "filename", + symbols = { + modified = "", -- Text to show when the file is modified. + readonly = "", -- Text to show when the file is non-modifiable or readonly. + unnamed = "", -- Text to show for unnamed buffers. + newfile = "[New]", -- Text to show for newly created file before first write + }, }, - update_in_insert = true, - on_click = function () - vim.defer_fn(function() - vim.cmd("TroubleToggle") - end, 100) - end, }, - { - 'filetype', - colored = true, - on_click = function(_, _) - vim.defer_fn(function() - vim.cmd("Telescope filetypes") - end, 100) - end + lualine_c = { + { + "branch", + icon = "󰊤", + }, + { + "diff", + symbols = { + added = "+", + modified = "~", + removed = "-", + }, + on_click = function() + vim.defer_fn(function() + vim.cmd("Gitsigns diffthis") + end, 100) + end, + }, }, - 'encoding', - 'fileformat' + lualine_x = { + { + function() + local client_id = vim.lsp.get_client_by_id(1) + return " LSP ~ " .. client_id.name + end, + on_click = function() + vim.defer_fn(function() + vim.cmd("LspInfo") + end, 100) + end, + color = "lualine_c_inactive", + }, + { + "diagnostics", + symbols = { + error = options.lsp.icons.Error, + warn = options.lsp.icons.Warn, + info = options.lsp.icons.Info, + hint = options.lsp.icons.Hint, + }, + sources = { + "nvim_diagnostic", + }, + update_in_insert = true, + on_click = function() + vim.defer_fn(function() + vim.cmd("TroubleToggle") + end, 100) + end, + }, + { + "filetype", + colored = true, + on_click = function(_, _) + vim.defer_fn(function() + vim.cmd("Telescope filetypes") + end, 100) + end, + }, + "encoding", + "fileformat", + }, + lualine_y = { + { "progress" }, + }, + lualine_z = { "location" }, }, - lualine_y = { - { 'progress' } + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { + { + "filename", + symbols = { + modified = "", -- Text to show when the file is modified. + readonly = "", -- Text to show when the file is non-modifiable or readonly. + unnamed = "", -- Text to show for unnamed buffers. + newfile = "[New]", -- Text to show for newly created file before first write + }, + }, + }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, }, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { - { - 'filename', - symbols = { - modified = '', -- Text to show when the file is modified. - readonly = '', -- Text to show when the file is non-modifiable or readonly. - unnamed = '', -- Text to show for unnamed buffers. - newfile = '[New]', -- Text to show for newly created file before first write - } - } - }, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} } - } - end - } + end, + }, } - diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua index a43d7b4..61cee9b 100644 --- a/lua/plugins/noice.lua +++ b/lua/plugins/noice.lua @@ -6,7 +6,7 @@ return { "rcarriga/nvim-notify", -- fancy notifications "MunifTanjim/nui.nvim", -- gui component library }, - opts = function(_,_) + opts = function(_, _) return { cmdline = { enabled = true, @@ -14,22 +14,22 @@ return { cmdline = { pattern = "^:", icon = " ", - lang = "vim" + lang = "vim", }, }, opts = { win_options = { winhighlight = { - FloatBorder = "LspInfoBorder" - } + FloatBorder = "LspInfoBorder", + }, }, position = { row = 5, col = "50%", }, - } - } + }, + }, } - end - } + end, + }, } diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua index 6f03e38..3885933 100644 --- a/lua/plugins/nvim-tree.lua +++ b/lua/plugins/nvim-tree.lua @@ -18,7 +18,7 @@ return { enable = true, }, hijack_directories = { - enable = true + enable = true, }, renderer = { highlight_git = true, @@ -33,8 +33,8 @@ return { }, view = { signcolumn = "no", - width = 45 - } - } - } + width = 45, + }, + }, + }, } diff --git a/lua/plugins/statuscol.lua b/lua/plugins/statuscol.lua index 5df618f..4ee8cbe 100644 --- a/lua/plugins/statuscol.lua +++ b/lua/plugins/statuscol.lua @@ -9,7 +9,7 @@ return { "toggleterm", "dashboard", "aerial", - "NvimTree" + "NvimTree", }, segments = { -- diagnostic signs @@ -17,10 +17,10 @@ return { sign = { name = { "Diagnostic" }, colwidth = 2, - maxwidth = 1 + maxwidth = 1, }, auto = true, - click = "v:lua.ScSa" + click = "v:lua.ScSa", }, -- line numbers { @@ -30,16 +30,15 @@ return { -- folds { text = { builtin.foldfunc }, - click = "v:lua.ScFa" + click = "v:lua.ScFa", }, -- git signs { sign = { namespace = { "gitsigns" } }, - click = "v:lua.ScSa" - } - } + click = "v:lua.ScSa", + }, + }, }) end, - } + }, } - diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index d0bca07..fcad07f 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -4,9 +4,9 @@ return { dependencies = { "sharkdp/fd", "nvim-lua/plenary.nvim", - 'nvim-tree/nvim-web-devicons', + "nvim-tree/nvim-web-devicons", -- extensionsdiff - 'jonarrien/telescope-cmdline.nvim', + "jonarrien/telescope-cmdline.nvim", "debugloop/telescope-undo.nvim", }, tag = "0.1.6", @@ -14,26 +14,22 @@ return { defaults = { layout_strategy = "horizontal", layout_config = { - prompt_position = "top" + prompt_position = "top", }, sorting_strategy = "ascending", winblend = 0, - theme = "dropdown" + theme = "dropdown", }, extensions = { - cmdline = { - }, - undo = { - - }, + cmdline = {}, + undo = {}, }, }, config = function(_, opts) - require('telescope').setup(opts) + require("telescope").setup(opts) require("telescope").load_extension("cmdline") require("telescope").load_extension("undo") - end + end, }, } - diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index f07e41c..4af1892 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -3,7 +3,7 @@ return { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", event = { - "VeryLazy" + "VeryLazy", }, dependencies = { "nvim-treesitter/nvim-treesitter-textobjects", @@ -30,10 +30,10 @@ return { end, }, indent = { - enable = true + enable = true, }, autotag = { - enable = true + enable = true, }, textobjects = { move = { @@ -47,6 +47,6 @@ return { }, config = function(_, opts) require("nvim-treesitter.configs").setup(opts) - end - } + end, + }, } diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua index c1ed9e9..28bca4b 100644 --- a/lua/plugins/trouble.lua +++ b/lua/plugins/trouble.lua @@ -1,12 +1,12 @@ return { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = function (_) - local options = require('options') - return { + opts = function(_) + local options = require("options") + return { padding = false, indent_lines = false, - auto_jump = { }, + auto_jump = {}, signs = { error = options.lsp.icons.Error, warning = options.lsp.icons.Warn, @@ -15,5 +15,5 @@ return { other = options.lsp.icons.Info, }, } - end + end, } diff --git a/lua/plugins/ufo.lua b/lua/plugins/ufo.lua index 469c7ce..855a5b1 100644 --- a/lua/plugins/ufo.lua +++ b/lua/plugins/ufo.lua @@ -2,10 +2,10 @@ return { { "kevinhwang91/nvim-ufo", event = { - "InsertEnter" + "InsertEnter", }, dependencies = { - "kevinhwang91/promise-async" + "kevinhwang91/promise-async", }, opts = { preview = { @@ -18,8 +18,8 @@ return { }, -- register treesitter as source for scopes provider_selector = function(_, _, _) - return { 'treesitter', 'indent' } - end - } - } + return { "treesitter", "indent" } + end, + }, + }, } diff --git a/lua/plugins/vscode-theme.lua b/lua/plugins/vscode-theme.lua index c5deeda..3a72b91 100644 --- a/lua/plugins/vscode-theme.lua +++ b/lua/plugins/vscode-theme.lua @@ -6,6 +6,6 @@ return { style = "dark", transparent = true, italic_comments = false, - } - } + }, + }, } diff --git a/setup-neovim.sh b/setup-neovim.sh index bf5c97d..acde148 100755 --- a/setup-neovim.sh +++ b/setup-neovim.sh @@ -2,19 +2,19 @@ printf "Continue copying files and removing current for Neovim (y/n)? " read -r choice -case "$choice" in - y|Y ) - echo "removing current neovim config..." - rm -rfv ~/.config/nvim/* - echo "copying files..." - cp -rv * ~/.config/nvim/ - ;; - n|N ) - echo "aborting..." - exit 0 - ;; - * ) - echo "invalid" - exit 1 - ;; +case "$choice" in +y | Y) + echo "removing current neovim config..." + rm -rfv ~/.config/nvim/* + echo "copying files..." + cp -rv * ~/.config/nvim/ + ;; +n | N) + echo "aborting..." + exit 0 + ;; +*) + echo "invalid" + exit 1 + ;; esac