Skip to content

yanghaoxie/company-manually

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

company-manually

https://melpa.org/packages/company-manually-badge.svg https://stable.melpa.org/packages/company-manually-badge.svg https://img.shields.io/badge/License-GPLv3-blue.svg

Introduction

This package let you build your own candidate list manually (therefore company-manually), which is used for company-mode. For example, when writing Tex document, I can use command company-manually-add-candidate-at-point or company-manually-add-candidate-ivy to manually add x_{a} and x_{b} to company-manually--candidates. Then if I insert x, company backend company-manually will display x_{a} and x_{b} as candidates to let me choose among them.

Table of Contents

Install

Use package

(use-package
  :load-path "path/to/company-manually.el")

Usage

Tips

You would better set company-minimum-prefix-length to 1, if you are using cdlatex and the prefixes of some of you candidates consist of one letter and _ or ^, for example x_{a}.

The season is that by default if you enable cdlatex, when you enter _ or ^, cdlatex will automatically add {}. This feature will get rid of candidates which have similar prefix as we pointed out previously. In order to bypass this, we advice cdlatex-sub-superscript so if company tooltip or company posframe are visible, cdlatex will not insert {}. In addition, company tooltip or company posframe will only display if number of inserted letters is bigger than company-minimum-prefix-length and there are candidates. Therefore, setting company-minimum-prefix-length to 1 is preferable.

add candidates

  • company-manually-add-candidate-at-point: first mark the region you would like to be candidate, then execute this command.
  • company-manually-add-candidate-ivy: execute this command, then input the candidate.

delete candidates

  • company-manually-delete-candidate-at-point: first mark the region you would like to be deleted from candidates, then execute this command.
  • company-manually-add-candidate-ivy: execute this command, then input the candidate you would like to delete.

cleanup candidates

  • company-manually-cleanup-candidates: cleanup all candidates.

Customization

  • company-manually-restore: whether save and restore the candidates (default t).
  • company-manually-file: default file for saving/loading company-manually candidates (default (concat user-emacs-directory ".company-manually.el")).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •