Giter Club home page Giter Club logo

nvim-cmp-fonts's Introduction

nvim-cmp-fonts

Contents

Preview

Introduction

nvim-cmp-fonts is a completion source for nvim-cmp that provides sources for fonts. This is especially useful for editing configuration file types. It gets them from the fonts installed on your computer, which you can see by using the fc-list command. Every time you open Neovim, the list of fonts is updated.

Dependencies

  • fontconfig

Installation

require "packer".startup(function(use)
    use "amarakon/nvim-cmp-fonts"
end)

Setup

The following code block shows the default options.

require "cmp".setup {
    sources = {
        -- Most font names have spaces in them. However, nvim-cmp restarts the
        -- completion after a space, disallowing you to complete a font name
        -- with spaces. The `space_filter` option is a way to get around this by
        -- using a different character to represent spaces. If you wish, you can
        -- set this option to a space character, but you know the downside of
        -- that.
        { name = "fonts", option = { space_filter = "-" } }
    }
}

Only for certain file types

-- Only enable `fonts` for `conf` and `config` file types
require "cmp".setup.filetype({ "conf", "config" },
    { sources = { { name = "fonts"} } })

nvim-cmp-fonts's People

Contributors

amarakon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mbaneshi

nvim-cmp-fonts's Issues

How to install using lazy.nvim?

using { "amarakon/nvim-cmp-fonts", opts = {} } leads to the following error message:

Failed to run `config` for nvim-cmp-fonts
.../Local/nvim-data/lazy/lazy.nvim/lua/lazy/core/loader.lua:355: attempt to call field 'setup' (a nil value)
# stacktrace:
  - AppData\Local\nvim\init.lua:106

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.