diff options
-rw-r--r-- | init.lua | 14 | ||||
-rw-r--r-- | lua/lv-telescope/init.lua | 8 | ||||
-rw-r--r-- | lua/plugins.lua | 114 | ||||
-rw-r--r-- | lua/settings.lua | 16 | ||||
-rw-r--r-- | lv-settings.lua | 2 |
5 files changed, 88 insertions, 66 deletions
@@ -1,10 +1,6 @@ require('lv-globals') vim.cmd('luafile '..CONFIG_PATH..'/lv-settings.lua') - - require('settings') -require('lv-gitblame') -require('lv-matchup') require('plugins') require('lv-utils') require('lv-autocommands') @@ -15,18 +11,17 @@ require('lv-galaxyline') require('lv-comment') require('lv-compe') require('lv-barbar') -require('lv-dashboard') require('lv-telescope') require('lv-gitsigns') require('lv-treesitter') require('lv-autopairs') -require('lv-rnvimr') require('lv-which-key') -require('lv-lsp-rooter') -require('lv-zen') -- extras if O.extras then + require('lv-rnvimr') + require('lv-gitblame') + require('lv-matchup') require('lv-numb') require('lv-dial') require('lv-hop') @@ -34,6 +29,9 @@ if O.extras then require('lv-spectre') require('lv-symbols-outline') require('lv-vimtex') + require('lv-zen') + require('lv-dashboard') + require('lv-lsp-rooter') end -- TODO is there a way to do this without vimscript diff --git a/lua/lv-telescope/init.lua b/lua/lv-telescope/init.lua index 96404654..de081424 100644 --- a/lua/lv-telescope/init.lua +++ b/lua/lv-telescope/init.lua @@ -1,5 +1,5 @@ local actions = require('telescope.actions') -local trouble = require("trouble.providers.telescope") +-- local trouble = require("trouble.providers.telescope") -- Global remapping ------------------------------ -- '--color=never', @@ -41,7 +41,7 @@ require('telescope').setup { ["<C-c>"] = actions.close, ["<C-j>"] = actions.move_selection_next, ["<C-k>"] = actions.move_selection_previous, - ["<c-t>"] = trouble.open_with_trouble, + -- ["<c-t>"] = trouble.open_with_trouble, ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, -- To disable a keymap, put [map] = false -- So, to not map "<C-n>", just put @@ -60,7 +60,7 @@ require('telescope').setup { n = { ["<C-j>"] = actions.move_selection_next, ["<C-k>"] = actions.move_selection_previous, - ["<c-t>"] = trouble.open_with_trouble, + -- ["<c-t>"] = trouble.open_with_trouble, ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist -- ["<C-i>"] = my_cool_custom_action, } @@ -69,4 +69,4 @@ require('telescope').setup { extensions = {fzy_native = {override_generic_sorter = false, override_file_sorter = true}} } -require'telescope'.load_extension('project') +-- require'telescope'.load_extension('project') diff --git a/lua/plugins.lua b/lua/plugins.lua index 959a71bf..3a290739 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -33,48 +33,46 @@ return require("packer").startup(function(use) use "wbthomason/packer.nvim" -- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function) - use {"neovim/nvim-lspconfig", opt = true} - use {"glepnir/lspsaga.nvim", opt = true} + use {"neovim/nvim-lspconfig", event = "BufRead", opt = true} use {"kabouzeid/nvim-lspinstall", opt = true} - use {"folke/trouble.nvim", opt = true} -- Telescope use {"nvim-lua/popup.nvim", opt = true} use {"nvim-lua/plenary.nvim", opt = true} use {"nvim-telescope/telescope.nvim", opt = true} - use {"nvim-telescope/telescope-fzy-native.nvim", opt = true} - use {"nvim-telescope/telescope-project.nvim", opt = true} - - -- Debugging - use {"mfussenegger/nvim-dap", opt = true} -- Autocomplete - use {"hrsh7th/nvim-compe", opt = true} - use {"hrsh7th/vim-vsnip", opt = true} - use {"rafamadriz/friendly-snippets", opt = true} + use {"hrsh7th/nvim-compe", event = "InsertEnter", opt = true} -- Treesitter - use {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"} - use {"windwp/nvim-ts-autotag", opt = true} - use {'andymass/vim-matchup', opt = true} + use { + "nvim-treesitter/nvim-treesitter", + event = "BufRead" + + -- run = ":TSUpdate" + + } -- Explorer - use {"kyazdani42/nvim-tree.lua", opt = true} - use {"ahmedkhalf/lsp-rooter.nvim", opt = true} -- with this nvim-tree will follow you - -- TODO remove when open on dir is supported by nvimtree - use "kevinhwang91/rnvimr" + -- use {"kyazdani42/nvim-tree.lua", opt = true} + + use { + "kyazdani42/nvim-tree.lua", + opt = true, + cmd = "NvimTreeToggle", + config = function() + require("nvimTree").config() + end + } -- use {'lukas-reineke/indent-blankline.nvim', opt=true, branch = 'lua'} - use {"lewis6991/gitsigns.nvim", opt = true} - use {'f-person/git-blame.nvim', opt = true} + use {"lewis6991/gitsigns.nvim", event = "BufRead", opt = true} + use {"folke/which-key.nvim", opt = true} - use {"ChristianChiarulli/dashboard-nvim", opt = true} - use {"windwp/nvim-autopairs", opt = true} - use {"kevinhwang91/nvim-bqf", opt = true} + use {"windwp/nvim-autopairs", event = "InsertEnter", opt = true} -- Comments use {"terrortylor/nvim-comment", opt = true} - use {'JoosepAlviste/nvim-ts-context-commentstring', opt = true} -- Color use {"christianchiarulli/nvcode-color-schemes.vim", opt = true} @@ -86,44 +84,25 @@ return require("packer").startup(function(use) use {"glepnir/galaxyline.nvim", opt = true} use {"romgrk/barbar.nvim", opt = true} - -- Zen Mode - use {"Pocco81/TrueZen.nvim", opt = true} - - - -- Sane gx for netrw_gx bug - use {"felipec/vim-sanegx"} - + use {"hrsh7th/vim-vsnip", opt = true} + require_plugin("vim-vsnip") require_plugin("nvim-lspconfig") - require_plugin("lspsaga.nvim") require_plugin("nvim-lspinstall") - require_plugin('trouble.nvim') - require_plugin("friendly-snippets") require_plugin("popup.nvim") require_plugin("plenary.nvim") require_plugin("telescope.nvim") - require_plugin('telescope-project.nvim') - require_plugin("nvim-dap") require_plugin("nvim-compe") - require_plugin("vim-vsnip") require_plugin("nvim-treesitter") - require_plugin("nvim-ts-autotag") - require_plugin('vim-matchup') require_plugin("nvim-tree.lua") require_plugin("gitsigns.nvim") - require_plugin("git-blame.nvim") require_plugin("which-key.nvim") - require_plugin("dashboard-nvim") require_plugin("nvim-autopairs") require_plugin("nvim-comment") - require_plugin("nvim-bqf") require_plugin("nvcode-color-schemes.vim") require_plugin("nvim-web-devicons") require_plugin("galaxyline.nvim") require_plugin("barbar.nvim") - require_plugin('lsp-rooter.nvim') - require_plugin("TrueZen.nvim") - require_plugin("nvim-ts-context-commentstring") -- Extras if O.extras then @@ -162,6 +141,51 @@ return require("packer").startup(function(use) -- Latex use {"lervag/vimtex", opt = true} require_plugin("vimtex") + -- matchup + use {'andymass/vim-matchup', opt = true} + require_plugin('vim-matchup') + -- comments in context + use {'JoosepAlviste/nvim-ts-context-commentstring', opt = true} + require_plugin("nvim-ts-context-commentstring") + -- Zen Mode + use {"Pocco81/TrueZen.nvim", opt = true} + require_plugin("TrueZen.nvim") + -- Git extras + use {'f-person/git-blame.nvim', opt = true} + require_plugin("git-blame.nvim") + -- TODO remove when open on dir is supported by nvimtree + -- use "kevinhwang91/rnvimr" + use {"nvim-telescope/telescope-fzy-native.nvim", opt = true} + use {"nvim-telescope/telescope-project.nvim", opt = true} + require_plugin('telescope-project.nvim') + + -- Debugging + use {"mfussenegger/nvim-dap", opt = true} + require_plugin("nvim-dap") + + use {"rafamadriz/friendly-snippets", opt = true} + require_plugin("friendly-snippets") + + use {"kevinhwang91/nvim-bqf", opt = true} + require_plugin("nvim-bqf") + + use {"ahmedkhalf/lsp-rooter.nvim", opt = true} -- with this nvim-tree will follow you + require_plugin('lsp-rooter.nvim') + + use {"glepnir/lspsaga.nvim", opt = true} + require_plugin("lspsaga.nvim") + + use {"ChristianChiarulli/dashboard-nvim", opt = true} + require_plugin("dashboard-nvim") + + use {"folke/trouble.nvim", opt = true} + require_plugin('trouble.nvim') + + -- Sane gx for netrw_gx bug + use {"felipec/vim-sanegx", opt = true} + -- Autotag + -- use {"windwp/nvim-ts-autotag", opt = true} + -- require_plugin("nvim-ts-autotag") -- folke/todo-comments.nvim -- gennaro-tedesco/nvim-jqx diff --git a/lua/settings.lua b/lua/settings.lua index b8bd7093..21131537 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -1,12 +1,12 @@ vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object" vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|. vim.cmd('set inccommand=split') -- Make substitution work in realtime -vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers +-- vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers vim.o.title = true TERMINAL = vim.fn.expand('$TERMINAL') vim.cmd('let &titleold="'..TERMINAL..'"') vim.o.titlestring="%<%F%=%l/%L - nvim" -vim.wo.wrap = O.wrap_lines -- Display long lines as just one line +-- vim.wo.wrap = O.wrap_lines -- Display long lines as just one line vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys vim.cmd('syntax on') -- syntax highlighting vim.o.pumheight = 10 -- Makes popup menu smaller @@ -23,21 +23,21 @@ vim.cmd('set ts=4') -- Insert 2 spaces for a tab vim.cmd('set sw=4') -- Change the number of space characters inserted for indentation vim.cmd('set expandtab') -- Converts tabs to spaces vim.bo.smartindent = true -- Makes indenting smart -vim.wo.number = O.number -- set numbered lines -vim.wo.relativenumber = O.relative_number -- set relative number -vim.wo.cursorline = O.cursorline -- set highlighting of the current line +-- vim.wo.number = O.number -- set numbered lines +-- vim.wo.relativenumber = O.relative_number -- set relative number +-- vim.wo.cursorline = O.cursorline -- set highlighting of the current line vim.o.showtabline = 2 -- Always show tabs vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore vim.o.backup = false -- This is recommended by coc vim.o.writebackup = false -- This is recommended by coc vim.o.swapfile = false -- Do not write any swp files -vim.o.undodir = CACHE_PATH .. '/undo' -- Set undo directory +-- vim.o.undodir = CACHE_PATH .. '/undo' -- Set undo directory vim.o.undofile = true -- Enable persistent undo vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time vim.o.updatetime = 300 -- Faster completion -vim.o.timeoutlen = O.timeoutlen -- By default timeoutlen is 1000 ms +-- vim.o.timeoutlen = O.timeoutlen -- By default timeoutlen is 1000 ms vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else -vim.g.nvim_tree_disable_netrw = O.nvim_tree_disable_netrw -- enable netrw for remote gx gf support (must be set before plugin's packadd) +-- vim.g.nvim_tree_disable_netrw = O.nvim_tree_disable_netrw -- enable netrw for remote gx gf support (must be set before plugin's packadd) vim.cmd('filetype plugin on') -- filetype detection -- vim.o.guifont = "JetBrainsMono\\ Nerd\\ Font\\ Mono:h18" -- vim.o.guifont = "Hack\\ Nerd\\ Font\\ Mono" diff --git a/lv-settings.lua b/lv-settings.lua index 5425c9a7..17100e46 100644 --- a/lv-settings.lua +++ b/lv-settings.lua @@ -14,7 +14,7 @@ O.auto_close_tree = 0 O.wrap_lines = false O.timeoutlen = 100 O.document_highlight = true -O.extras = true +O.extras = false O.leader_key = ' ' -- dashboard |