summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.vim/lua/lsp.lua37
-rw-r--r--.vim/lua/plugins.lua44
2 files changed, 48 insertions, 33 deletions
diff --git a/.vim/lua/lsp.lua b/.vim/lua/lsp.lua
index 530a49e..84ba548 100644
--- a/.vim/lua/lsp.lua
+++ b/.vim/lua/lsp.lua
@@ -260,6 +260,43 @@ local format = function(afile)
   end
 end
 
+local symbols = {
+  -- 󰆼  󱆃
+  Array = '󰨾 ',
+  Boolean = '󰦍 ',
+  Class = '󰙀 ',
+  Color = '󰉦 ',
+  Constant = ' ',
+  Constructor = '󱇿 ',
+  Enum = ' ',
+  EnumMember = ' ',
+  Event = '󱐋 ',
+  -- Field = '󰽜 ',
+  Field = '󰆈 ',
+  File = '󰈔 ',
+  Folder = '󰝰 ',
+  Function = ' ',
+  Interface = '󱦜 ',
+  Key = '󰌋 ',
+  Keyword = '󰓽 ',
+  Method = '󰒓 ',
+  Module = '󰏖 ',
+  Namespace = '󰆧 ',
+  Null = '󰎣 ',
+  Object = '󰘦 ',
+  Operator = '󱓉 ',
+  Property = '󰐱 ',
+  Package = '󰏗 ',
+  Reference = '󰌹 ',
+  Snippet = '󰯁 ',
+  Struct = '󰙅 ',
+  Text = '󰉿 ',
+  TypeParameter = '󰌨 ',
+  Unit = '󰠱 ',
+  Value = '󰎠 ',
+  Variable = '󱄑 ',
+}
+
 return {
   my_attach    = my_attach,
   my_exit      = my_exit,
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index 1ec5df0..b3cfb1f 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -350,6 +350,9 @@ require('packer').startup({function()
     end} -- }}}
 
   use {'neovim/nvim-lspconfig', -- {{{
+    require = {
+      'nvim-lua/lsp-status.nvim',
+    },
     config = function()
       require('lsp').setup()
     end} -- }}}
@@ -437,8 +440,8 @@ require('packer').startup({function()
       'hrsh7th/cmp-nvim-lsp-signature-help',
       'saadparwaiz1/cmp_luasnip',
       'f3fora/cmp-spell',
-      'onsails/lspkind-nvim',
       'windwp/nvim-autopairs',
+      'neovim/nvim-lspconfig',
     },
     config = function()
       local cmp = require('cmp')
@@ -547,9 +550,8 @@ require('packer').startup({function()
         }),
         formatting = {
           fields = {'kind', 'abbr', 'menu'},
-          format = require('lspkind').cmp_format {
-            mode = 'symbol',
-            menu = {
+          format = function(entry, item)
+            local menus = {
               nvim_lsp = '░ lsp',
               luasnip  = '░ snip',
               nvim_lua = '░ nvim',
@@ -557,35 +559,11 @@ require('packer').startup({function()
               spell    = '░ spell',
               path     = '░ path',
               buffer   = '░ buf',
-            },
-            symbol_map = {
-              Text = ' ',
-              Method = ' ',
-              Function = ' ',
-              Constructor = ' ',
-              Field = ' ',
-              Variable = ' ',
-              Class = '󰄶 ',
-              Interface = ' ',
-              Module = ' ',
-              Property = '󱊈 ',
-              Unit = '󰒠 ',
-              Value = ' ',
-              Enum = ' ',
-              Keyword = ' ',
-              Snippet = ' ',
-              Color = ' ',
-              File = ' ',
-              Reference = ' ',
-              Folder = ' ',
-              EnumMember = ' ',
-              Constant = ' ',
-              Struct = 'פּ ',
-              Event = ' ',
-              Operator = ' ',
-              TypeParameter = '() ',
-            },
-          },
+            }
+            item.kind = package.loaded.lsp.symbols[item.kind] or ''
+            item.menu = menus[entry.source.name]
+            return item
+          end,
         },
       }
       cmp.setup.cmdline('/', {