diff --git a/init.lua b/init.lua index cf08ff4d..2ba022a2 100644 --- a/init.lua +++ b/init.lua @@ -7,8 +7,5 @@ require 'plugins' -- Define custom keymappings require 'keymaps' --- Setup LSP configuration -require 'config_lsp' - -- Remaining vim commands to be converted to lua require 'vimcommands' diff --git a/lua/config_lsp.lua b/lua/config_plugins/config_lsp.lua similarity index 98% rename from lua/config_lsp.lua rename to lua/config_plugins/config_lsp.lua index 2f0ef833..4191b61b 100644 --- a/lua/config_lsp.lua +++ b/lua/config_plugins/config_lsp.lua @@ -8,8 +8,8 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end -- Use an on_attach function to only map the following keys diff --git a/lua/plugins.lua b/lua/plugins.lua index 2af98f1c..c34f6d78 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -5,6 +5,12 @@ vim.cmd([[ augroup end ]]) +if vim.version().minor <= 7 then + NIGHTFOXVERSION = '15f3b5837a8d07f45cbe16753fbf13630bc167a3' +else + NIGHTFOXVERSION = '*' +end + require('packer').startup { function(use) use 'wbthomason/packer.nvim' @@ -16,18 +22,26 @@ require('packer').startup { } use 'kyazdani42/nvim-web-devicons' use 'nvim-lua/plenary.nvim' + use { + 'neovim/nvim-lspconfig', + config = function() + require 'config_plugins.config_lsp' + end, + } use 'christoomey/vim-tmux-navigator' - use 'neovim/nvim-lspconfig' - use 'hrsh7th/cmp-nvim-lsp' - use 'hrsh7th/cmp-buffer' - use 'hrsh7th/cmp-path' - use 'hrsh7th/cmp-cmdline' - use 'hrsh7th/cmp-nvim-lua' - use 'hrsh7th/nvim-cmp' - use 'hrsh7th/cmp-vsnip' - use 'hrsh7th/vim-vsnip' + use { + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/cmp-nvim-lua', + 'hrsh7th/nvim-cmp', + 'hrsh7th/cmp-vsnip', + 'hrsh7th/vim-vsnip', + } use { 'EdenEast/nightfox.nvim', + tag = NIGHTFOXVERSION, config = function() require 'config_plugins.config_nightfox' end