From 0a5fad632b42aee44a3b3d03bb9f50eb0420872a Mon Sep 17 00:00:00 2001 From: xiaoshihou514 <108414369+xiaoshihou514@users.noreply.github.com> Date: Sat, 25 Nov 2023 12:13:24 +0000 Subject: [PATCH] add kind icons demo --- README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 29d04ed..e8008d2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ ## epo.nvim -[Screencast from 2023-11-24 12-51-25.webm](https://github.com/xiaoshihou514/epo.nvim/assets/108414369/0de9adc5-81ea-4b31-b42f-898fc95efd33) Blazingly fast, minimal lsp auto-completion and snippet plugin for neovim. +[demo.webm](https://github.com/xiaoshihou514/epo.nvim/assets/108414369/e6df8be6-1cd3-4f53-96ba-023d785a0d1c) + **Needs neovim nightly** **This plugin would be much more feature-complete after [this pr](https://github.com/neovim/neovim/pull/24723) is merged** @@ -56,7 +57,7 @@ PmenuThumb ```
-Click to show some mapping presets +Click to show some config presets - TAB complete @@ -89,6 +90,25 @@ vim.keymap.set('i', '', function() end, {expr = true}) ``` +- kind icons like in the demo +```lua +-- reference: onsails/lspkind.nvim +local kind_icons = { + 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 = " ", Unknown = " ", +} + +require("epo").setup { + kind_format = function(k) + return kind_icons[k] .. " " .. k + end +} + +``` + - use `` to accept completion ```lua @@ -107,8 +127,9 @@ vim.keymap.set("i", "", function() end return require("nvim-autopairs").autopairs_cr() end, { expr = true, noremap = true }) -``` +require("nvim-autopairs").setup({ map_cr = false }) +```
## License MIT