GithubHelp home page GithubHelp logo

evannjohnson / modeline-extras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from basbebe/modeline-extras.kak

0.0 0.0 0.0 11 KB

a collection of additional options for Kakoune's status line

License: The Unlicense

KakouneScript 100.00%

modeline-extras's Introduction

modeline-extras.kak

A collection of additional options for Kakoune's native status line.

Installation

Add modeline-extras.kak to the plugin manager of your choice, put it into yout autoload or source it manually.

Using alexherbo2/plug.kak:

plug modeline-extras https://github.com/basbebe/modeline-extras.kak %{
  #your config
}

Otherwise:

require-module modeline-extras

Usage

This plugins makes the following options available for modelinefmt:

  • modeline_nerdfont: Enable Nerd Fonts symbols. Default: false.

  • modeline_buffer_position: Shows the current buffer position as a symbol (source)

  • modeline_codepoint: Shows the Unicode code point of the current cursor position (source)

  • modeline_git_branch: Shows the current Git branch

  • modeline_indent: Shows the number of spaces set as indentwidth for the current buffer or a tabstop-symbol.

  • modeline_lsp_err: Shows the number of errors by kak-lsp

  • modeline_lsp_warn: Shows the number of warnings by kak-lsp

Every option needs to be enabled first with it's corresponding command:

modeline-buffer-position-enable
modeline-codepoint-enable
modeline-git-branch-enable
modeline-indent-enable
modeline-lsp-enable

Use faces or markup strings to change colors and attributes.

Example config

plug modeline-extras git/modeline-extras.kak %{
  # enable Nerd Font symbols
  set-option global modeline-nerdfont true

  # enable options
  modeline-buffer-position-enable
  modeline-git-branch-enable
  modeline-indent-enable
  modeline-lsp-enable

  # Git branch + Filename
  set-option global modelinefmt '{magenta+i}%opt{modeline_git_branch} {bright-blue+u}%val{bufname}{default}'
  # Position
  set-option -add global modelinefmt ' %val{cursor_line}:%val{cursor_char_column} %opt{modeline_buffer_position}{default}'
  # Context Info + Mode Info
  set-option -add global modelinefmt ' {{context_info}} {{mode_info}}'
  # lsp
  set-option -add global modelinefmt ' {DiagnosticError}%opt{modeline_lsp_err}{DiagnosticWarning}%opt{modeline_lsp_warn}{default}'
  # Filetype + Indentwidth
  set-option -add global modelinefmt ' %opt{filetype} %opt{modeline_indent}'
  # client@session
  set-option -add global modelinefmt ' {bright-cyan}%val{client}๏‘Œ{bright-cyan+b}%val{session}'
}

preview image

Similar projects

Contributing

Pull requests are welcome.

License

The Unlicense

modeline-extras's People

Contributors

basbebe 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.