MCPcopy
hub / github.com/ternjs/tern_for_vim

github.com/ternjs/tern_for_vim @0.5.0 sqlite

repository ↗ · DeepWiki ↗ · release 0.5.0 ↗
38 symbols 96 edges 1 files 0 documented · 0%
README

Tern for Vim

This is a Vim plugin that provides Tern-based JavaScript editing support.

In JavaScript files, the package will hook into omni completion to handle autocompletion, and provide the following commands:

TernDef: Jump to the definition of the thing under the cursor.

TernDoc: Look up the documentation of something.

TernType: Find the type of the thing under the cursor.

TernRefs: Show all references to the variable or property under the cursor.

TernRename: Rename the variable under the cursor.

Installation

If you use Pathogen or something similar, you can clone this repository to your ~/.vim/bundle (or equivalent) directory. Make sure you have node.js and npm installed (Tern is a JavaScript program), and install the tern server by running npm install in the bundle/tern_for_vim directory.

Configuration

The command used to start the Tern server can be overridden by setting tern#command to an array of strings (the binary and its arguments, if any). You might need this if your node is installed somewhere that's not in the default path, or if you want to install Tern in some custom location.

The variable tern#is_show_argument_hints_enabled can be set to something truthy to make the plugin display the arguments to the current function at the bottom of the screen. This feature is currently not very mature, and likely to make your editing laggy.

Tern uses .tern-project files to configure loading libraries and plugins for a project. See the Tern docs for details.

Core symbols most depended-on inside this repo

tern_runCommand
called by 7
script/tern.py
mycmp
called by 6
script/tern.py
tern_relativeFile
called by 4
script/tern.py
tern_displayError
called by 3
script/tern.py
tern_makeRequest
called by 3
script/tern.py
tern_projectDir
called by 3
script/tern.py
tern_findServer
called by 3
script/tern.py
tern_projectFilePath
called by 3
script/tern.py

Shape

Function 27
Method 9
Class 2

Languages

Python100%

Modules by API surface

script/tern.py38 symbols

Dependencies from manifests, versioned

tern>=0.5 · 1×

For agents

$ claude mcp add tern_for_vim \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact