GitHub | 您所在的位置:网站首页 › lua语言goto › GitHub |
Introduction
This is a neovim plugin for highlighting symbols with overlays. Highlights will be updated automatically along with edits. It depends on neovim-lspconfig and telescope.nvim(optional). Usage Toggle highlight under cursor:lua require('symbol-overlay').toggle() or press t by default. Add highlights in batchFor this to work, telescope.nvim is needed :Telescope symbol_overlay gen or press g by default. List highglights and gotoFor this to work, telescope.nvim is needed :Telescope symbol_overlay list or press l by default. Clear all highlights:lua require('symbol-overlay').clear_all() or press c by default. goto next/prev highlight:lua require('symbol-overlay').next_highlight() / :lua require('symbol-overlay').prev_highlight() or press n/ p by default. InstallBy lazy.nvim: { 'hek14/symbol-overlay.nvim' dependencies = { "neovim/neovim-lspconfig" }, -- add telescope.nvim if you want to use batch mode event = 'BufRead', config = function () require('symbol-overlay').setup() require'telescope'.load_extension('symbol_overlay') -- comment this if you don't have telescope installed end } Config require('symbol-overlay').setup({ colors = { "#1F6C4A", '#0000ff', "#C70039", '#ffa724', "#b16286", "#d79921", "#d65d0e", "#458588", '#aeee00', '#ff0000', '#b88823', "#a89984", '#ff2c4b' }, keymap = { toggle = 't', clear_all = 'c', next_highlight = 'n', prev_highlight = 'p', gen = 'g', list = 'l', } }) TODO add treesitter backend (maybe) scope-limited search in batch mode, like Telescope symbol_overlay gen @function ".*setup.*" |
CopyRight 2018-2019 实验室设备网 版权所有 |