diff --git a/init.vim b/init.vim index 49c010f..57de09b 100755 --- a/init.vim +++ b/init.vim @@ -32,7 +32,9 @@ source ~/.config/nvim/plugin-confs/lspconfig.lua source ~/.config/nvim/plugin-confs/lsplines.lua source ~/.config/nvim/plugin-confs/null-ls.lua source ~/.config/nvim/plugin-confs/nvim-cmp.lua +source ~/.config/nvim/plugin-confs/luasnip.lua source ~/.config/nvim/plugin-confs/fidget.lua +source ~/.config/nvim/plugin-confs/rainbow-delimiters.lua " source ~/.config/nvim/plugin-confs/symbols-outline.lua " source ~/.config/nvim/plugin-confs/chatgpt.lua source ~/.config/nvim/plugin-confs/nvim-colorizer.lua diff --git a/lua/plugins.lua b/lua/plugins.lua index 0101c9f..7a61d4d 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -228,10 +228,14 @@ require('packer').startup(function(use) "iamcco/markdown-preview.nvim", run = function() vim.fn["mkdp#util#install"]() end }) - - use 'L3MON4D3/LuaSnip' - use 'folke/neodev.nvim' - use 'saadparwaiz1/cmp_luasnip' + use { + "L3MON4D3/LuaSnip", + -- tag = "v2.*", + run = "make install_jsregexp", + dependencies = { "rafamadriz/friendly-snippets" } + } + use { 'folke/neodev.nvim' } + use { 'saadparwaiz1/cmp_luasnip' } use { 'hrsh7th/cmp-buffer' } use { 'hrsh7th/cmp-cmdline' } use { 'hrsh7th/cmp-nvim-lsp' } @@ -293,6 +297,7 @@ require('packer').startup(function(use) use { 'lewis6991/gitsigns.nvim' } use { 'rcarriga/nvim-notify' } use { 'stevearc/dressing.nvim' } + use { 'HiPhish/rainbow-delimiters.nvim' } -- }}} diff --git a/plugin-confs/lspconfig.lua b/plugin-confs/lspconfig.lua index 3999f36..c4aa30d 100644 --- a/plugin-confs/lspconfig.lua +++ b/plugin-confs/lspconfig.lua @@ -44,8 +44,8 @@ local on_attach = function(client, bufnr) -- end end -vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]] -vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]] +-- vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]] +-- vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]] -- squared corners diff --git a/plugin-confs/luasnip.lua b/plugin-confs/luasnip.lua new file mode 100644 index 0000000..80309d7 --- /dev/null +++ b/plugin-confs/luasnip.lua @@ -0,0 +1 @@ +require("luasnip.loaders.from_vscode").lazy_load() diff --git a/plugin-confs/nvim-cmp.lua b/plugin-confs/nvim-cmp.lua index 19c2cd6..940da1e 100644 --- a/plugin-confs/nvim-cmp.lua +++ b/plugin-confs/nvim-cmp.lua @@ -7,6 +7,9 @@ local luasnip = require 'luasnip' local highlight = require('cmp.utils.highlight') local highlight_symbol_under_cursor = function() + -- if the client has not resolved the document highlight capability, then + -- don't do anything + if not vim.lsp.buf.document_highlight then return end vim.cmd [[ hi! LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow hi! LspReferenceText cterm=bold ctermbg=red guibg=LightYellow @@ -244,13 +247,13 @@ for _, lsp in ipairs(servers) do if lsp == 'lua_ls' then lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, - on_attach = highlight_symbol_under_cursor(), + -- on_attach = highlight_symbol_under_cursor(), capabilities = capabilities, callSnippet = "Replace" } else lspconfig[lsp].setup { - on_attach = highlight_symbol_under_cursor(), + -- on_attach = highlight_symbol_under_cursor(), capabilities = capabilities } end diff --git a/plugin-confs/nvim-notify.lua b/plugin-confs/nvim-notify.lua index b52a643..52d25fa 100644 --- a/plugin-confs/nvim-notify.lua +++ b/plugin-confs/nvim-notify.lua @@ -1,5 +1,5 @@ require("notify").setup({ - background_colour = "NotifyBackground", + background_colour = "#000000", fps = 144, icons = { DEBUG = "", diff --git a/plugin-confs/rainbow-delimiters.lua b/plugin-confs/rainbow-delimiters.lua new file mode 100644 index 0000000..82e5f6d --- /dev/null +++ b/plugin-confs/rainbow-delimiters.lua @@ -0,0 +1,15 @@ +-- This module contains a number of default definitions +local rainbow_delimiters = require 'rainbow-delimiters' + +vim.g.rainbow_delimiters = { + strategy = { + [''] = rainbow_delimiters.strategy['global'], + vim = rainbow_delimiters.strategy['local'] + }, + query = { [''] = 'rainbow-delimiters', lua = 'rainbow-blocks' }, + highlight = { + 'RainbowDelimiterRed', 'RainbowDelimiterYellow', 'RainbowDelimiterBlue', + 'RainbowDelimiterOrange', 'RainbowDelimiterGreen', + 'RainbowDelimiterViolet', 'RainbowDelimiterCyan' + } +}