diff --git a/vim/.vim/lua/config/nvim-treesitter.lua b/vim/.vim/lua/config/nvim-treesitter.lua index f03f0b8..cab331c 100644 --- a/vim/.vim/lua/config/nvim-treesitter.lua +++ b/vim/.vim/lua/config/nvim-treesitter.lua @@ -4,7 +4,7 @@ require('nvim-treesitter.configs').setup { ensure_installed = "all", -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + sync_install = false, highlight = { -- `false` will disable the whole extension diff --git a/vim/.vim/lua/plugins.lua b/vim/.vim/lua/plugins.lua index ca9bce4..e216e6a 100644 --- a/vim/.vim/lua/plugins.lua +++ b/vim/.vim/lua/plugins.lua @@ -1,16 +1,17 @@ local use_google = require("utils").use_google 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", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) +vim.opt.rtp:prepend("$HOME/.vim/lua") -- Example using a list of specs with the default options vim.g.mapleader = "," -- Make sure to set `mapleader` before lazy so your mappings are correct @@ -19,9 +20,9 @@ vim.g.windowswap_map_keys = 0 -- require('lspconfig') require("lazy").setup({ - "folke/which-key.nvim", - { "folke/neoconf.nvim", cmd = "Neoconf" }, - "folke/neodev.nvim", + "folke/which-key.nvim", + { "folke/neoconf.nvim", cmd = "Neoconf" }, + "folke/neodev.nvim", 'lewis6991/impatient.nvim', 'dstein64/vim-startuptime', @@ -34,14 +35,14 @@ require("lazy").setup({ }, { - "nvim-neo-tree/neo-tree.nvim", + "nvim-neo-tree/neo-tree.nvim", config = function() require("config.neotree") end, dependencies = { - "nvim-lua/plenary.nvim", - -- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + -- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", } - }, + }, -- Undo tree { @@ -66,6 +67,7 @@ require("lazy").setup({ -- Completion and linting 'neovim/nvim-lspconfig', + { 'hrsh7th/nvim-cmp', dependencies = { @@ -82,127 +84,129 @@ require("lazy").setup({ 'hrsh7th/cmp-vsnip', 'ray-x/cmp-treesitter', }, + event = 'InsertEnter', config = function() require("config.lsp") end, }, + { - "tzachar/cmp-tabnine", run = "./install.sh", + "tzachar/cmp-tabnine", build = "./install.sh", event = 'InsertEnter', cond = not use_google(), }, + { 'ErichDonGubler/lsp_lines.nvim', config = function() require("lsp_lines").setup() end }, - { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - 'VonHeikemen/lsp-zero.nvim', - }, { 'jose-elias-alvarez/null-ls.nvim', config = function() require("config.null-ls") end, }, - { - 'nvim-telescope/telescope.nvim', - cmd = 'Telescope', - config = function() - require('telescope').setup { - pickers = { - buffers = { - sort_lastused = true, - }, + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + 'VonHeikemen/lsp-zero.nvim', + { + 'nvim-telescope/telescope.nvim', + cmd = 'Telescope', + config = function() + require('telescope').setup { + pickers = { + buffers = { + sort_lastused = true, + }, + }, + } + end, + dependencies = { + 'nvim-lua/plenary.nvim', }, - } - end, - dependencies = { - 'nvim-lua/plenary.nvim', + event = { "BufReadPost", "BufNewFile" }, + keys = { + { + 'tf', + function() + require('telescope.builtin').find_files{ find_command = {'rg', '--files', '--hidden', '-g', '!node_modules/**'} } + end, + desc = 'Telescope Files', + remap = false, + unique = true, + }, + { + 'th', + function() + require('telescope.builtin').help_tags{} + end, + desc = 'Telescope Help', + remap = false, + unique = true, + }, + { + 'tw', + function() + require('telescope.builtin').grep_string{} + end, + desc = 'Telescope Word', + remap = false, + unique = true, + }, + { + 'tg', + function() + require('telescope.builtin').live_grep{} + end, + desc = 'Telescope Grep', + remap = false, + unique = true, + }, + { + 'cs', + function() + require('telescope').extensions.codesearch.find_query{} + end, + desc = 'Telescope Codesearch', + remap = false, + unique = true, + }, + { + 'CS', + function() + require('telescope').extensions.codesearch.find_query{default_text_expand=''} + end, + desc = 'Telescope Codesearch', + remap = false, + unique = true, + }, + { + 'CS', + function() + require('telescope').extensions.codesearch.find_query{} + end, + desc = 'Telescope Codesearch', + remap = false, + unique = true, + mode = "v", + }, + + { "tm", ":Telescope citc modified" }, + { "tb", "Telescope file_browser" }, + { 'fs', function() require('telescope').extensions.fig.status{} end }, + { 'fx', function() require('telescope').extensions.fig.xl{} end }, + { 'fw', function() require('telescope').extensions.fig.status{whatsout=true} end }, + } }, - event = { "BufReadPost", "BufNewFile" }, - keys = { - { - 'tf', - function() - require('telescope.builtin').find_files{ find_command = {'rg', '--files', '--hidden', '-g', '!node_modules/**'} } - end, - desc = 'Telescope Files', - remap = false, - unique = true, - }, - { - 'th', - function() - require('telescope.builtin').help_tags{} - end, - desc = 'Telescope Help', - remap = false, - unique = true, - }, - { - 'tw', - function() - require('telescope.builtin').grep_string{} - end, - desc = 'Telescope Word', - remap = false, - unique = true, - }, - { - 'tg', - function() - require('telescope.builtin').live_grep{} - end, - desc = 'Telescope Grep', - remap = false, - unique = true, - }, - { - 'cs', - function() - require('telescope').extensions.codesearch.find_query{} - end, - desc = 'Telescope Codesearch', - remap = false, - unique = true, - }, - { - 'CS', - function() - require('telescope').extensions.codesearch.find_query{default_text_expand=''} - end, - desc = 'Telescope Codesearch', - remap = false, - unique = true, - }, - { - 'CS', - function() - require('telescope').extensions.codesearch.find_query{} - end, - desc = 'Telescope Codesearch', - remap = false, - unique = true, - mode = "v", - }, - { "tm", ":Telescope citc modified" }, - { "tb", "Telescope file_browser" }, - { 'fs', function() require('telescope').extensions.fig.status{} end }, - { 'fx', function() require('telescope').extensions.fig.xl{} end }, - { 'fw', function() require('telescope').extensions.fig.status{whatsout=true} end }, - } - }, - - { - 'nvim-telescope/telescope-file-browser.nvim', - dependencies = {'nvim-telescope/telescope.nvim'} + { + 'nvim-telescope/telescope-file-browser.nvim', + dependencies = {'nvim-telescope/telescope.nvim'} }, -- Rust { 'saecki/crates.nvim', ft = 'rust', - tag = 'v0.3.0', + version = 'v0.3.0', dependencies = { 'nvim-lua/plenary.nvim' }, config = function() require('crates').setup() end }, + {'simrat39/rust-tools.nvim', ft = 'rust'}, { @@ -212,22 +216,22 @@ require("lazy").setup({ { 'ThePrimeagen/refactoring.nvim', - dependencies = { + dependencies = { {"nvim-lua/plenary.nvim"}, {"nvim-treesitter/nvim-treesitter"} }, config = function() require("config.refactoring") end }, - 'apalmer1377/factorus', + 'apalmer1377/factorus', 'hrsh7th/vim-vsnip', 'kosayoda/nvim-lightbulb', - {'andymass/vim-matchup', event = 'VimEnter'}, - 'jghauser/mkdir.nvim', + 'nvim-lua/lsp-status.nvim', + + {'andymass/vim-matchup', event = 'VimEnter'}, { 'simrat39/symbols-outline.nvim', config = function() require("config.symbols-outline") end }, { 'petertriho/nvim-scrollbar', config = function() require("scrollbar").setup() end }, - { 'rmagatti/auto-session', lazy = false, @@ -239,7 +243,6 @@ require("lazy").setup({ end }, - { "ipod825/libp.nvim", config = function() @@ -247,7 +250,7 @@ require("lazy").setup({ end, }, - 'nvim-lua/lsp-status.nvim', + { 'nvim-lualine/lualine.nvim', lazy = false, @@ -267,24 +270,23 @@ require("lazy").setup({ }, { 'akinsho/git-conflict.nvim', - tag = '*', config = function() require('git-conflict').setup() end, }, { 'rhysd/conflict-marker.vim' } }, -- { "catppuccin/nvim", as = "catppuccin" } - { "catppuccin/nvim", as = "catppuccin", lazy=false, config = function() require("config.catppuccin") end}, + { "catppuccin/nvim", name = "catppuccin", lazy=false, config = function() require("config.catppuccin") end}, + -- Tmux - { - 'preservim/vimux', - 'tmux-plugins/vim-tmux', - 'christoomey/vim-tmux-navigator', - 'whatyouhide/vim-tmux-syntax', - 'tmux-plugins/vim-tmux-focus-events', - 'jabirali/vim-tmux-yank', - 'skywind3000/asyncrun.vim', - }, + 'preservim/vimux', + 'tmux-plugins/vim-tmux', + 'christoomey/vim-tmux-navigator', + 'whatyouhide/vim-tmux-syntax', + 'tmux-plugins/vim-tmux-focus-events', + 'jabirali/vim-tmux-yank', + 'skywind3000/asyncrun.vim', + { 'ojroques/nvim-osc52', config = function() require("config.oscyank") end @@ -302,7 +304,7 @@ require("lazy").setup({ 'ntpeters/vim-better-whitespace', 'junegunn/fzf.vim', - { 'junegunn/fzf', run = ":call fzf#install()" }, + { 'junegunn/fzf', build = ":call fzf#install()" }, 'nathanaelkane/vim-indent-guides', 'tversteeg/registers.nvim', @@ -325,8 +327,8 @@ require("lazy").setup({ }, { "iamcco/markdown-preview.nvim", - run = "cd app && npm install", - setup = function() vim.g.mkdp_filetypes = { "markdown" } end, + build = "cd app && npm install", + init = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" } }, @@ -367,11 +369,11 @@ require("lazy").setup({ enabled = use_google(), config = function() require("config.google-comments") end }, - -- { - -- dir = '/google/src/cloud/cnieves/google-comments/google3/experimental/users/cnieves/neovim/critique', - -- enabled = use_google(), - -- config = function() require("critique").setup() end, - -- }, + -- { + -- dir = '/google/src/cloud/cnieves/google-comments/google3/experimental/users/cnieves/neovim/critique', + -- enabled = use_google(), + -- config = function() require("critique").setup() end, + -- }, { url = "sso://googler@user/smwang/hg.nvim", dependencies = { "ipod825/libp.nvim" }, @@ -383,16 +385,16 @@ require("lazy").setup({ }, }, { - defaults = { - lazy = true, -- should plugins be lazy-loaded? +defaults = { + -- lazy = true, -- should plugins be lazy-loaded? }}) --- CiderLSP -vim.opt.completeopt = { "menu", "menuone", "noselect" } --- Don't show the dumb matching stuff -vim.opt.shortmess:append("c") + -- CiderLSP + vim.opt.completeopt = { "menu", "menuone", "noselect" } + -- Don't show the dumb matching stuff + vim.opt.shortmess:append("c") -vim.opt.spell = true -vim.opt.spelllang = { 'en_us' } + vim.opt.spell = true + vim.opt.spelllang = { 'en_us' } -require("config.imp") + require("config.imp") diff --git a/vim/.vimrc b/vim/.vimrc index 415c6c3..da984b2 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -5,6 +5,7 @@ filetype off " required set rtp+=~/.vim set rtp+=~/.vim/after set rtp+=~/.config/nvim/after/ +set rtp+=~/.vim/lua/ set directory=/tmp set undodir=/tmp