Giter Site home page Giter Site logo

folding-nvim's Introduction

LSP-Powered folding plugin for neovim.

Requirements

Neovim nightly, nvim_lsp as well as the language servers you want to use this plugin with.

Installation

Install this plugin using your favorite package manager, or clone the source code inside /path_to_nvim_config_folder/pack/opt/*/ where * stands fot the standard wildcard.

Example (assuming your plugins are stored inside ~/.config/nvim/pack/github/opt)

git clone https://github.com/pierreglaser/folding-nvim ~/.config/nvim/pack/github/opt/folding-nvim

And make sure the plugin is loaded at initialization by placing the following inside your init.vim

packadd folding-nvim

Configuration

Neovim needs to add the folding.on_attach callback to each language server you want to use this plugin with. For instance, for palantir/python-language-server, add those following lua lines to your vimrc:

lua << EOF
function on_attach_callback(client, bufnr)
  -- If you use completion-nvim/diagnostic-nvim, uncomment those two lines.
  -- require('diagnostic').on_attach()
  -- require('completion').on_attach()
  require('folding').on_attach()
end

require'nvim_lsp'.pyls.setup{on_attach=on_attach_callback}
EOF

LICENCE

BSD 3-Clause Licence.

folding-nvim's People

Contributors

pierreglaser avatar timbedard avatar vitaly 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.