Skip to content

bydlw98/blink-cmp-env

Repository files navigation

blink-cmp-env

blink.cmp source for environment variables.

Inspired by cmp-env.

Features

  • Trigger on dollar sign $.

Installation

lazy.nvim

{
    "saghen/blink.cmp",
    dependencies = {
        "bydlw98/blink-cmp-env",
    },
    opts = {
        sources = {
            default = { "lsp", "path", "snippets", "buffer", "env" },
            providers = {
                env = {
                    name = "Env",
                    module = "blink-cmp-env",
                    --- @type blink-cmp-env.Options
                    opts = {
                        item_kind = require("blink.cmp.types").CompletionItemKind.Variable,
                        show_braces = false,
                        show_documentation_window = true,
                    },
                }
            }
        }
    }
}

Options

item_kind (type: number)

Default: require("blink.cmp.types").CompletionItemKind.Variable,

CompletionItemKind shown in completion menu.

show_braces (type: boolean)

Default: false

Specify whether to show braces in completion item. For example, ${PATH} instead of $PATH.

show_documentation_window (type: boolean)

Default: true

Specify whether to show documentation window which contains value of environment variable selected.

Special Thanks

  • @amarz45 cmp-env general improvements and implementation for show_braces options

Credit

About

Environment variables source for blink.cmp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages