Language server for navigating FFI calls
Project description
FFI Navigator
FFI Navigator is a toolkit that enhances IDEs to navigate around project specific ffi calls. Currently it supports the PackedFunc FFI in the Apache TVM project.
It is implemented as a language server.
Structure
- python/ffi_navigator The analysis code and language server
- vscode-extension language server extension for vscode
Installation
Install dependencies
pip install --user attrs python-jsonrpc-server``
Then we need to ake sure ffi_navigator is in your python path in bashrc.
export PYTHONPATH=${PYTHONPATH}:/path/to/ffi-navigator/python
VSCode
See vscode-extension
Emacs
Install lsp-mode
Add the following configuration
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection '("python3" "-m" "ffi_navigator.langserver"))
:major-modes '(python-mode c++-mode)
:server-id 'ffi-navigator))
Set the project root to be /path/to/tvm
using M-x
lsp-workspace-folders-add
[RET]
/path/to/tvm
Try out the goto definition by opening a python file
- Move cursor to python/tvm/api.py line 59
_api_internal._min_value
, typeM-x
lsp-find-definition
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ffi-navigator-0.1.tar.gz
(5.9 kB
view hashes)
Built Distributions
ffi_navigator-0.1-py3.6.egg
(15.5 kB
view hashes)
Close
Hashes for ffi_navigator-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea50f5deb0fd1440a971ab540d58035a7bcec7ef62c3a7ba6088803657451ffb |
|
MD5 | 2751809887d049c9775f129b01a3343e |
|
BLAKE2b-256 | de3155c2f3b57322c6b378464bad76bbe7a5c0bef4247f71a747a3977cb16663 |