Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
add kind icons demo
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoshihou514 authored Nov 25, 2023
1 parent 35da207 commit 0a5fad6
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down Expand Up @@ -56,7 +57,7 @@ PmenuThumb
```

<details>
<summary>Click to show some mapping presets</summary>
<summary>Click to show some config presets</summary>

- <kbd>TAB</kbd> complete

Expand Down Expand Up @@ -89,6 +90,25 @@ vim.keymap.set('i', '<C-e>', 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 `<cr>` to accept completion

```lua
Expand All @@ -107,8 +127,9 @@ vim.keymap.set("i", "<cr>", function()
end
return require("nvim-autopairs").autopairs_cr()
end, { expr = true, noremap = true })
```

require("nvim-autopairs").setup({ map_cr = false })
```
</details>

## License MIT

0 comments on commit 0a5fad6

Please sign in to comment.