Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LSP's Go to definition plugin for neovim.

NotificationsYou must be signed in to change notification settings

hrsh7th/nvim-gtd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 

Repository files navigation

LSP's Go To Definition plugin for neovim.

This plugin is highly experimental.The breaking changes will be applied without notice.

Concept

  • RuntextDocument/definition andgf in one mapping.
  • Open the path as much as possible

Usage

---@classgtd.kit.App.Config.Schema---@fieldpublicsources{name:string,option?:table}[]# Specify the source that will be used to search for the definition---@fieldpublicget_buffer_path fun():string# Specify the function to get the current buffer path. It's useful for searching path from terminal buffer etc.---@fieldpublicon_event fun(event:gtd.Event)---@fieldpublicon_context fun(context:gtd.Context) # Modify context on user-land.---@fieldpublicon_cancel fun(params:gtd.Params)---@fieldpublicon_nothing fun(params:gtd.Params)---@fieldpublicon_location fun(params:gtd.Params,location:gtd.kit.LSP.LocationLink)---@fieldpublicon_locations fun(params:gtd.Params,locations:gtd.kit.LSP.LocationLink[])-- The `findup` and `lsp` source are enabled by default (at the moment).require('gtd').setup {...gtd.kit.App.Config.Schema...}vim.keymap.set('n','gf<CR>',function()require('gtd').exec({command='edit'})end)vim.keymap.set('n','gfs',function()require('gtd').exec({command='split'})end)vim.keymap.set('n','gfv',function()require('gtd').exec({command='vsplit'})end)

Sources

The following sources are built-in.

lsp_definition

(Default: enabled)

Find definitions via LSPtextDocument/definition.

lsp_type_definition

(Default: enabled)

Find definitions via LSPtextDocument/typeDefinition.

lsp_implementation

(Default: enabled)

Find definitions via LSPtextDocument/implementation.

findup

(Default: enabled)

Find definitions viavim.fn.findfile with; flag.

walk

(Default: disabled)

Traverse all filepaths under project.

option-nametypedescription
root_markersstring[]Specify root markers like{ '.git', 'tsconfig.json' }.
ignore_patternsstring[]Specify ignore patterns like{ '/node_modules', '/.git' }

About

LSP's Go to definition plugin for neovim.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp