Skip to content

mpinta/outln.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

outln.nvim

An outline plugin for Neovim, kinda.

What and how?

Plugin provides an interface to easily and quickly jump to a language-specific definition within an open file. Under the hood it uses nvim-treesitter to find the necessary nodes and dressing.nvim to provide the UI.

Install

Using packer plugin manager:

use {
    "mpinta/outln.nvim",
    requires = {
        "stevearc/dressing.nvim",
        {
            "nvim-treesitter/nvim-treesitter",
            run = ":TSUpdate"
        }
    }
}

Dependencies

Visit the dressing.nvim's repository page to check and set your UI configuration options. Don't forget to install supported language's parser using the nvim-treesitter plugin.

Configuration

Plugin can be used without any specific setup. However, it provides configuration options, with the following defaults, that can be overridden.

local outln = require("outln")

outln.setup({
    after = "normal zt",
    go = {
        methods = true,
        functions = true,
        structs = true,
        interfaces = true
    },
    openapi = {
        endpoints = true,
        components = true
    },
    python = {
        functions = true,
        classes = true
    }
})

Options

Basic options:

Option Description
after The command that will be run after jumping to the selected definition.
go Represents settings for the Go language.
openapi Represents settings for the OpenAPI language.
python Represents settings for the Python language.

Language-specific options:

Option Description Language support
methods Enables searching for method definitions. go
functions Enables searching for function definitions. go, python
structs Enables searching for struct definitions. go
interfaces Enables searching for interface definitions. go
endpoints Enables searching for endpoint definitions. openapi
components Enables searching for component definitions. openapi
classes Enables searching for class definitions. python

Commands

Use the :Outln command to open the plugin interface.

Language support

Supported languages are:

  • Go
  • OpenAPI
  • Python