Skip to content

Commit

Permalink
update readme to clarify intention.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaket committed Nov 29, 2024
1 parent 53a73d7 commit 02420cd
Showing 1 changed file with 23 additions and 87 deletions.
110 changes: 23 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,39 @@
<p align="center">
<img width="300" alt="Codeium" src="codeium.svg"/>
</p>

---

[![Discord](https://img.shields.io/discord/1027685395649015980?label=community&color=5865F2&logo=discord&logoColor=FFFFFF)](https://discord.gg/3XFf78nAx5)
[![Twitter Follow](https://img.shields.io/badge/style--blue?style=social&logo=twitter&label=Follow%20%40codeiumdev)](https://twitter.com/intent/follow?screen_name=codeiumdev)
![License](https://img.shields.io/github/license/Exafunction/codeium.nvim)
[![Docs](https://img.shields.io/badge/Codeium%20Docs-09B6A2)](https://docs.codeium.com)
[![Canny Board](https://img.shields.io/badge/Feature%20Requests-6b69ff)](https://codeium.canny.io/feature-requests/)
[![built with Codeium](https://codeium.com/badges/main)](https://codeium.com?repo_name=exafunction%2Fcodeium.nvim)

[![Visual Studio](https://img.shields.io/visual-studio-marketplace/i/Codeium.codeium?label=Visual%20Studio&logo=visualstudio)](https://marketplace.visualstudio.com/items?itemName=Codeium.codeium)
[![JetBrains](https://img.shields.io/jetbrains/plugin/d/20540?label=JetBrains)](https://plugins.jetbrains.com/plugin/20540-codeium/)
[![Open VSX](https://img.shields.io/open-vsx/dt/Codeium/codeium?label=Open%20VSX)](https://open-vsx.org/extension/Codeium/codeium)
[![Google Chrome](https://img.shields.io/chrome-web-store/users/hobjkcpmjhlegmobgonaagepfckjkceh?label=Google%20Chrome&logo=googlechrome&logoColor=FFFFFF)](https://chrome.google.com/webstore/detail/codeium/hobjkcpmjhlegmobgonaagepfckjkceh)

# codeium.nvim

Native [Codeium](https://www.codeium.com/) plugin for Neovim.
[Codeium](https://www.codeium.com/) plugin for Neovim. Forked from [Exafunction/codeium.nvim](https://github.com/Exafunction/codeium.nvim).

## Contributing
Deviation from upstream:

Feel free to create an issue/PR if you want to see anything else implemented.

## Screenshots

[Completion in Action](https://user-images.githubusercontent.com/522465/215312040-d5e91a6b-cffa-48f1-909f-360328b5af79.webm)
1. Removed [cmp](https://github.com/hrsh7th/nvim-cmp) support in favor of [blink.cmp](https://github.com/Saghen/blink.cmp), most of the change comes from [this PR](https://github.com/Exafunction/codeium.nvim/pull/264)
2. Remove Chats functionality
3. Ignore all 500 issues as I've seen them from time to time.

## Installation

### [packer.nvim](https://github.com/wbthomason/packer.nvim)

```lua
use {
"Exafunction/codeium.nvim",
requires = {
"nvim-lua/plenary.nvim",
"hrsh7th/nvim-cmp",
},
config = function()
require("codeium").setup({
})
end
}
```

### [lazy.nvim](https://github.com/folke/lazy.nvim)

```lua
{
"Exafunction/codeium.nvim",
'saghen/blink.cmp',
dependencies = {
"nvim-lua/plenary.nvim",
"hrsh7th/nvim-cmp",
{
"xiaket/codeium.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {},
},
},
config = function()
require("codeium").setup({
})
end
opts = {
sources = {
completion = {
enabled_providers = { 'lsp', 'path', 'snippets', 'buffer', 'codeium' },
},
providers = {
codeium = { name = 'Codeium', module = 'codeium.blink' },
},
},
},
},
```

Expand All @@ -68,9 +43,6 @@ After installation and configuration, you will need to authenticate with
Codeium. This can be done by running `:Codeium Auth`, copying the token from
your browser and pasting it into API token request.

To use Codeium Chat, execute the `:Codeium Chat` command. The chat will be opened
in your default browser using the xdg-open command.

## Options

- `config_path`: the path to the config file, used to store the API key.
Expand All @@ -82,7 +54,6 @@ in your default browser using the xdg-open command.
- `portal_url`: the portal URL to use (for enterprise mode). Defaults to `host:port`
- `enterprise_mode`: enable enterprise mode
- `detect_proxy`: enable or disable proxy detection
- `enable_chat`: enable chat functionality
- `enable_cmp_source`: defaults to true. Set `false` to disable registering a `cmp` source
- `virtual_text`: configuration for showing completions in virtual text
- `enabled`: defaults to `false`. Set `true` to enable the virtual text feature
Expand All @@ -106,50 +77,15 @@ in your default browser using the xdg-open command.
- `paths`: paths to files that indicate a workspace root when not using the LSP support
- `find_root`: An optional function that the plugin will call to find the workspace root.
- `tools`: paths to binaries used by the plugin:

- `uname`: not needed on Windows, defaults given.
- `uuidgen`
- `curl`:
- `gzip`: not needed on Windows, default implemenation given using powershell.exe Expand-Archive instead

- `language_server`: The path to the language server downloaded from the [official source.](https://github.com/Exafunction/codeium/releases/tag/language-server-v1.1.32)

- `wrapper`: the path to a wrapper script/binary that is used to execute any
binaries not listed under `tools`. This is primarily useful for NixOS, where
a FHS wrapper can be used for the downloaded codeium server.

### [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)

After calling `setup`, this plugin will register a source in nvim-cmp. nvim-cmp
can then be set up to use this source using the `sources` configuration:

```lua
cmp.setup({
-- ...
sources = {
-- ...
{ name = "codeium" }
}
})
```

If you are seeing the `codeium` source as unused in `:CmpStatus`, make sure that `nvim-cmp` setup happens before the `codeium.nvim` setup.

To set a symbol for codeium using lspkind, use the `Codeium` keyword. Example:

```lua
cmp.setup({
-- ...
formatting = {
format = require('lspkind').cmp_format({
mode = "symbol",
maxwidth = 50,
ellipsis_char = '...',
symbol_map = { Codeium = "", }
})
}
})
```

### Virtual Text

Expand Down

0 comments on commit 02420cd

Please sign in to comment.