Giter VIP home page Giter VIP logo

cool-chunk.nvim's Introduction

What can this plugin do

Forked from hlchunk. Indent has been removed (but if you want to use it, try indent-blankline). Chunk, context and line_num have been retained. It is simple, fast and cool.

Show Gif

Screencasts

Brief introduction

This plugin now has some functions, which include:

  1. chunk
  2. line_num (support highlight context and chunk range)
  3. context
  4. textobject (support context textobject and chunk textobject)
  5. jump (support jump to context start and end)

Requirements

neovim version >= 0.9.0

Installation

With Lazy

{
    "Mr-LLLLL/cool-chunk.nvim",
    event = { "CursorHold", "CursorHoldI" },
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    config = function()
        require("cool-chunk").setup({})
    end
},

Setup

The script comes with the following defaults:

Click this Dropdown to see default setttings.
{
    chunk = {
        notify = true,
        support_filetypes = ft.support_filetypes, -- ft = require("cool-chunk.utils.filetype").support_filetypes
        exclude_filetypes = ft.exclude_filetypes,
        hl_group = {
            chunk = "CursorLineNr",
            error = "Error",
        },
        chars = {
            horizontal_line = "",
            vertical_line = "",
            left_top = "",
            left_bottom = "",
            left_arrow = "<",
            bottom_arrow = "v",
            right_arrow = ">",
        },
        textobject = "ah",
        animate_duration = 200, -- if don't want to animation, set to 0.
        fire_event = { "CursorHold", "CursorHoldI" },
    },
    context = {
        notify = true,
        chars = {
            "",
        },
        hl_group = {
            context = "LineNr",
        },
        exclude_filetypes = ft.exclude_filetypes,
        support_filetypes = ft.support_filetypes,
        textobject = "ih",
        jump_support_filetypes = { "lua", "python" },
        jump_start = "[{",
        jump_end = "]}",
        fire_event = { "CursorHold", "CursorHoldI" },
    },
    line_num = {
        notify = true,
        hl_group = {
            chunk = "CursorLineNr",
            context = "LineNr",
            error = "Error",
        },
        support_filetypes = ft.support_filetypes,
        exclude_filetypes = ft.exclude_filetypes,
        fire_event = { "CursorHold", "CursorHoldI" },
    }
}

command

Click this Dropdown to see Available Commands

This plugin provides some commands to switch plugin status, which are listed below:

  • EnableCC
  • DisableCC
  • EnableCCChunk
  • DisableCCChunk
  • EnableCCContext
  • DisableCCContext
  • EnableCCLineNum
  • DisableCCLineNum

cool-chunk.nvim's People

Contributors

crivotz avatar itepechi avatar juanzoran avatar kang8 avatar miversen33 avatar mr-lllll avatar nyngwang avatar pauldesmondparker avatar pheon-dev avatar shellraining avatar xiao-m0 avatar zhangwwpeng 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.