diff --git a/init.lua b/init.lua index a6ceaa46..98a34dfa 100644 --- a/init.lua +++ b/init.lua @@ -44,7 +44,8 @@ vim.g.maplocalleader = ' ' -- Set powershell as the terminal local powershell_options = { shell = vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell", - shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;", + shellcmdflag = + "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;", shellredir = "-RedirectStandardOutput %s -NoNewWindow -Wait", shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode", shellquote = "", @@ -88,7 +89,8 @@ require('lazy').setup({ -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. - { -- LSP Configuration & Plugins + { + -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs to stdpath for neovim @@ -104,14 +106,16 @@ require('lazy').setup({ }, }, - { -- Autocompletion + { + -- Autocompletion 'hrsh7th/nvim-cmp', dependencies = { 'hrsh7th/cmp-nvim-lsp', 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip' }, }, -- Useful plugin to show you pending keybinds. { 'folke/which-key.nvim', opts = {} }, - { -- Adds git releated signs to the gutter, as well as utilities for managing changes + { + -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { -- See `:help gitsigns.txt` @@ -158,7 +162,8 @@ require('lazy').setup({ end, }, - { -- Set lualine as statusline + { + -- Set lualine as statusline 'nvim-lualine/lualine.nvim', -- See `:help lualine.txt` opts = { @@ -171,7 +176,8 @@ require('lazy').setup({ }, }, - { -- Add indentation guides even on blank lines + { + -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` @@ -200,7 +206,8 @@ require('lazy').setup({ end, }, - { -- Highlight, edit, and navigate code + { + -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', @@ -312,8 +319,8 @@ require('telescope').setup { defaults = { mappings = { i = { - [''] = false, - [''] = false, + [''] = false, + [''] = false, }, }, }, @@ -343,7 +350,7 @@ vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { de -- See `:help nvim-treesitter` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'rust', 'tsx', 'typescript', 'help', 'vim' }, + ensure_installed = { 'c', 'go', 'lua', 'rust', 'tsx', 'typescript', 'help', 'vim' }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, @@ -365,41 +372,41 @@ require('nvim-treesitter.configs').setup { lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim keymaps = { -- You can use the capture groups defined in textobjects.scm - ['aa'] = '@parameter.outer', - ['ia'] = '@parameter.inner', - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', + ['aa'] = '@parameter.outer', + ['ia'] = '@parameter.inner', + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', }, }, move = { enable = true, set_jumps = true, -- whether to set jumps in the jumplist goto_next_start = { - [']m'] = '@function.outer', - [']]'] = '@class.outer', + [']m'] = '@function.outer', + [']]'] = '@class.outer', }, goto_next_end = { - [']M'] = '@function.outer', - [']['] = '@class.outer', + [']M'] = '@function.outer', + [']['] = '@class.outer', }, goto_previous_start = { - ['[m'] = '@function.outer', - ['[['] = '@class.outer', + ['[m'] = '@function.outer', + ['[['] = '@class.outer', }, goto_previous_end = { - ['[M'] = '@function.outer', - ['[]'] = '@class.outer', + ['[M'] = '@function.outer', + ['[]'] = '@class.outer', }, }, swap = { enable = true, swap_next = { - ['a'] = '@parameter.inner', + ['a'] = '@parameter.inner', }, swap_previous = { - ['A'] = '@parameter.inner', + ['A'] = '@parameter.inner', }, }, }, @@ -516,14 +523,14 @@ cmp.setup { end, }, mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.scroll_docs( -4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete {}, - [''] = cmp.mapping.confirm { + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete {}, + [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, - [''] = cmp.mapping(function(fallback) + [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_jumpable() then @@ -532,11 +539,11 @@ cmp.setup { fallback() end end, { 'i', 's' }), - [''] = cmp.mapping(function(fallback) + [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable( -1) then - luasnip.jump( -1) + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) else fallback() end