GitHub 您所在的位置:网站首页 lua语言goto GitHub

GitHub

2023-03-22 10:59| 来源: 网络整理| 查看: 265

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 batch

For this to work, telescope.nvim is needed :Telescope symbol_overlay gen or press g by default.

List highglights and goto

For 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.

Install

By 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 实验室设备网 版权所有