Skip to content
프로젝트

benfowler/telescope-luasnip.nvim

GitHub에서 보기

소개

Neovim plugin. Telescope.nvim extension that adds LuaSnip integration.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

telescope-luasnip

This plugin adds a LuaSnip snippet picker to the already-awesome Neovim Telescope plugin.

This is a port of fhill2/telescope-ultisnips.nvim from Ultisnips to LuaSnip. Thanks for the simple great idea!

If you find something wrong, please raise an issue or better yet, raise a PR.

telescope-luasnip.nvim in action

[!WARNING] HELP WANTED: The original author currently doesn't have much capacity to support users or get the regression tests done at the moment.

Can you help out? If so, please feel free to take a look at the Issues, pick up a ticket, and maybe open a PR.

Requirements

Setup

Install the plugin using your favourite package manager.

use {
  "benfowler/telescope-luasnip.nvim",
  module = "telescope._extensions.luasnip",  -- if you wish to lazy-load
}

Then, you need to tell Telescope about this extension somewhere after your require('telescope').setup(), by calling:

require('telescope').load_extension('luasnip')

Usage

require'telescope'.extensions.luasnip.luasnip{}
vim.cmd [[ Telescope luasnip ]]

or

:Telescope luasnip

for windows system

:Telescope luasnip disable_ft=true

Configuration

This Telescope plugin works fine as-is, and requires no further configuration.

However, if you want, you can customise its search behaviour if you wish:

local lst = require('telescope').extensions.luasnip
local luasnip = require('luasnip')

require('telescope').setup {
  extensions = {
    -- ...
    luasnip = {
      search = function(entry)
        return lst.filter_null(entry.context.trigger) .. " " ..
               lst.filter_null(entry.context.name) .. " " ..
               entry.ft .. " " ..
               lst.filter_description(entry.context.name, entry.context.description) ..
               lst.get_docstring(luasnip, entry.ft, entry.context)[1]
      end
    },
     -- ...
  }
}

To change theme, try:

require('telescope').setup {
  luasnip = require("telescope.themes".get_dropdown({
      border   = false,
      preview  = {
        check_mime_type  = true
      },
      search = function ()
        -- ...
      end
    }))
}

Help!

Is there something not quite right or could be improved? Log an issue with a minimal reproduction, or better yet, raise a PR.

관련 프로젝트 살펴보기

불러오는 중…