Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voldikss/coc-browser
See https://github.com/voldikss/coc-extensions
https://github.com/voldikss/coc-browser
auto-completion coc-nvim neovim vim
Last synced: about 2 months ago
JSON representation
See https://github.com/voldikss/coc-extensions
- Host: GitHub
- URL: https://github.com/voldikss/coc-browser
- Owner: voldikss
- Archived: true
- Created: 2019-05-26T09:37:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-23T13:14:03.000Z (almost 4 years ago)
- Last Synced: 2024-09-30T15:28:46.276Z (3 months ago)
- Topics: auto-completion, coc-nvim, neovim, vim
- Language: TypeScript
- Homepage:
- Size: 188 KB
- Stars: 127
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - coc-browser
README
# coc-browser
![publish](https://github.com/voldikss/coc-browser/workflows/publish/badge.svg)
[![npm version](https://badge.fury.io/js/coc-browser.svg)](https://badge.fury.io/js/coc-browser)Browser words completion source for [coc.nvim](https://github.com/neoclide/coc.nvim)
![](https://user-images.githubusercontent.com/20282795/103974806-88212e00-51ad-11eb-9b22-61f230c2ab9e.gif)
## Installation
- **Install the [browser extension](https://chrome.google.com/webstore/detail/browser-source-provider/lkaldcfmhailjfcbapicgkdkkamanlml?utm_source=chrome-ntp-icon)**
Browser extension is used to grab words from web page and send them to the local server
- **Install [coc.nvim](https://github.com/neoclide/coc.nvim)**
- **Install coc-browser**
```vim
:CocInstall coc-browser
```## Config
- `browser.shortcut`:
default: `"web"`- `browser.priority`:
default: `5`- `browser.patterns`: default: `{"*": []}`
Javascript style regex patterns that defines the cursor position to enable autocomplete, empty array `[]` means to enable for whole buffer.
For example, in order to enable completion only if the cursor is in the
comment region in javascript file, set this option as follows```jsonc
"browser.patterns": {
"javascript": [
"^\\s*\\/\\/",
"^\\s*\\/\\*",
"^\\s*\\*"
]
}
```The `*` in the default value `{"*": []}` means to enable autocomplete for all
filetypes.- `browser.port`:
default: `8888`Port used to transfer words from browser extension to local server
## Command
- `:CocCommand browser.clearCache`: Clear completion source cache
## License
MIT