Giter Site home page Giter Site logo

ferris.nvim's Introduction

ferris.nvim ๐Ÿฆ€

a neovim plugin for interacting with Rust Analyzer's LSP extensions

installation & usage

note: this plugin has only been tested with neovim 0.9+

with lazy.nvim:

{
    'vxpm/ferris.nvim'
    opts = {
        -- your options here
    }
}

the available options (and their default values) are:

{
    -- If true, will automatically create commands for each LSP method
    create_commands = true, -- bool
    -- Handler for URL's (used for opening documentation)
    url_handler = "xdg-open", -- string | function(string)
}

you can also manually call the methods by requiring them:

local view_mem_layout = require("ferris.methods.view_memory_layout")

-- call the returned function to execute the request
view_mem_layout()

don't forget to call setup on require("ferris") beforehand, though! (not needed if you're using the opts field in lazy.nvim)

available methods

please do not mind the terrible screenshots... i was too lazy

Expand Macro

require("ferris.methods.expand_macro")

image.png

Join Lines

require("ferris.methods.join_lines")

View HIR

require("ferris.methods.view_hir")

image.png

View MIR

require("ferris.methods.view_mir")

image.png

View Memory Layout

require("ferris.methods.view_memory_layout")

image.png

View Item Tree

require("ferris.methods.view_item_tree")

View Syntax Tree

require("ferris.methods.view_syntax_tree")

Open Cargo.toml

require("ferris.methods.open_cargo_toml")

Open Parent Module

require("ferris.methods.open_parent_module")

Open Documentation

require("ferris.methods.open_documentation")

Reload Workspace

require("ferris.methods.reload_workspace")

Rebuild Macros

require("ferris.methods.rebuild_macros")

special thanks

rust-tools for being the reason why this plugins exists. initially, i didn't want any of the features it offered except for recursive expansion of macros, so i made rust-expand-macro.nvim.

however, i found myself wanting to use other methods as well, which led me to making ferris!

in comparison to rust-tools, this plugin is "simpler": it does not configure Rust Analyzer for you nor does it provide debugging utilities. i myself consider this a benefit, but it's up to your judgement.

ferris.nvim's People

Contributors

vxpm avatar b14ck313 avatar idanarye avatar mehalter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.