idris2-nvim icon indicating copy to clipboard operation
idris2-nvim copied to clipboard

feat: reimplement

Open srghma opened this issue 4 months ago • 2 comments

  1. I wanted to just delete syntax files, deprecate them in favour of https://github.com/kayhide/tree-sitter-idris and https://github.com/nvim-treesitter/nvim-treesitter/pull/7274

  2. but then started doing astronvim plugin https://github.com/AstroNvim/astrocommunity/pull/1258/files and couldnt connect

then I found that neovim already builtin the support for

  1. textDocument/semanticTokens/full (no need to handle it at all)
with and without lsp highlight

with

vim.api.nvim_set_hl(0, '@lsp.type.type', { fg = '#8be9fd' })                      -- Cyan
vim.api.nvim_set_hl(0, '@lsp.type.function', { fg = '#ff79c6' })                  -- Pink
vim.api.nvim_set_hl(0, '@lsp.type.enumMember', { italic = true })                 -- Purple
vim.api.nvim_set_hl(0, '@lsp.type.variable', { fg = '#ffb86c', bg = '#282828' })  -- Orange
vim.api.nvim_set_hl(0, '@lsp.type.keyword', { fg = '#bd93f9', bold = true })      -- Red
vim.api.nvim_set_hl(0, '@lsp.type.namespace', { fg = '#50fa7b', italic = true })  -- Green
vim.api.nvim_set_hl(0, '@lsp.type.postulate', { fg = '#ffffff', bg = '#ff5555' }) -- Red
vim.api.nvim_set_hl(0, '@lsp.type.module', { fg = '#f1fa8c' })                    -- Yellow

2024-11-02-01pm-30-48-screenshot

without, only treesitter

2024-11-02-01pm-33-03-screenshot

  1. and hover is builtin supported too using :lua =vim.lsp.buf.hover(), so, I deleted hover.lua too

other changes

  1. use only vim.ui
  2. add commands and keybindings
  3. TODO: restore config
  4. show warning if many lsp servers are opened simultaneusly
  5. code actions work not good rn, but actually I like <leader>la more

2024-11-02-01pm-41-40-screenshot

srghma avatar Nov 02 '24 06:11 srghma