-
Notifications
You must be signed in to change notification settings - Fork 0
Terminal Editor Integration
Status: ✅ Complete
Phase: Phase 2
Last Updated: December 9, 2025
RiceCoder provides native integration with popular terminal editors: vim, neovim, and emacs. These integrations enable seamless access to ricecoder's AI-powered features directly in your terminal editor, including code completion, diagnostics, hover information, and definition navigation.
- Vim 8.0+ or Neovim 0.5+
- RiceCoder installed and running
- Plugin manager (vim-plug, packer, lazy.nvim, etc.)
Add to your ~/.vimrc or ~/.config/nvim/init.vim:
Plug 'moabualruz/ricecoder-vim'Then run:
:PlugInstallAdd to your ~/.config/nvim/init.lua:
use {
'moabualruz/ricecoder-vim',
config = function()
require('ricecoder').setup()
end
}Then run:
:PackerSyncAdd to your ~/.config/nvim/init.lua:
{
'moabualruz/ricecoder-vim',
config = function()
require('ricecoder').setup()
end
}-
Clone the repository:
git clone https://github.com/moabualruz/ricecoder-vim.git
-
Copy to vim plugins directory:
cp -r ricecoder-vim ~/.vim/pack/plugins/start/
Add to your ~/.vimrc:
" Enable ricecoder
let g:ricecoder_enabled = 1
" Set ricecoder host and port
let g:ricecoder_host = 'localhost'
let g:ricecoder_port = 8080
" Enable features
let g:ricecoder_completion = 1
let g:ricecoder_diagnostics = 1
let g:ricecoder_hover = 1
let g:ricecoder_definition = 1
" Set timeout (milliseconds)
let g:ricecoder_timeout = 5000
" Set max completion results
let g:ricecoder_max_results = 50Add to your ~/.config/nvim/init.lua:
require('ricecoder').setup({
enabled = true,
host = 'localhost',
port = 8080,
features = {
completion = true,
diagnostics = true,
hover = true,
definition = true,
},
timeout = 5000,
max_results = 50,
})Intelligent code completion in vim/neovim.
How to Use:
- Automatic: Completions appear as you type (if configured)
- Manual: Press Ctrl+X Ctrl+O to trigger completion
- Select: Use arrow keys to navigate, Enter to select
- Dismiss: Press Escape to dismiss
Configuration:
" Enable automatic completion
set completeopt=menu,menuone,noselect
let g:ricecoder_auto_complete = 1Example:
fn main() {
let v = vec![1, 2, 3];
v. " Press Ctrl+X Ctrl+O
" Completions: iter(), len(), push(), etc.
}Real-time error and warning detection.
How to Use:
- Errors and warnings appear as signs in the gutter
- Use
:RiceCoder diagnosticsto show all diagnostics - Navigate with
:RiceCoder next-diagnosticand:RiceCoder prev-diagnostic
Configuration:
" Show diagnostics signs
let g:ricecoder_show_diagnostics = 1
" Show diagnostics in virtual text
let g:ricecoder_virtual_text = 1Example:
let x: i32 = "string"; " Error sign in gutter
" Hover to see error messageSymbol information on hover.
How to Use:
- Press
K(or configured key) to show hover information - Information appears in a floating window
- Press Escape to dismiss
Configuration:
" Set hover key
let g:ricecoder_hover_key = 'K'Example:
let result = vec![1, 2, 3];
" Press K to see: Vec<i32>Navigate to symbol definitions.
How to Use:
- Press
gdto go to definition - Press
Ctrl+]to jump to definition - Press
Ctrl+Tto go back
Configuration:
" Set definition key
nnoremap gd :RiceCoder definition<CR>| Shortcut | Command | Description |
|---|---|---|
| Ctrl+X Ctrl+O | Completion | Trigger completion |
| K | Hover | Show hover info |
| gd | Definition | Go to definition |
| Ctrl+] | Definition | Jump to definition |
| Ctrl+T | Back | Go back |
Add to your ~/.vimrc:
" Custom shortcuts
nnoremap <leader>rc :RiceCoder<CR>
nnoremap <leader>rd :RiceCoder definition<CR>
nnoremap <leader>rh :RiceCoder hover<CR>
nnoremap <leader>rn :RiceCoder next-diagnostic<CR>
nnoremap <leader>rp :RiceCoder prev-diagnostic<CR>| Command | Description |
|---|---|
:RiceCoder |
Show ricecoder status |
:RiceCoder completion |
Trigger completion |
:RiceCoder hover |
Show hover info |
:RiceCoder definition |
Go to definition |
:RiceCoder diagnostics |
Show all diagnostics |
:RiceCoder next-diagnostic |
Go to next diagnostic |
:RiceCoder prev-diagnostic |
Go to previous diagnostic |
:RiceCoder enable |
Enable ricecoder |
:RiceCoder disable |
Disable ricecoder |
:RiceCoder restart |
Restart ricecoder |
Problem: Plugin is not loaded
Solutions:
-
Verify plugin is installed:
ls ~/.vim/pack/plugins/start/ricecoder-vim -
Check vim configuration:
- Ensure
~/.vimrcis being loaded - Try
:source ~/.vimrcto reload
- Ensure
-
Check for errors:
- Run
:messagesto see error messages - Check plugin logs
- Run
-
Reinstall plugin:
- Remove plugin directory
- Reinstall using plugin manager
Problem: Code completions are not appearing
Solutions:
-
Verify completion is enabled:
:echo g:ricecoder_completion
-
Check ricecoder is running:
curl http://localhost:8080/health
-
Try manual trigger:
Ctrl+X Ctrl+O
-
Check for errors:
- Run
:messagesto see error messages - Check ricecoder logs
- Run
-
Increase timeout:
let g:ricecoder_timeout = 10000
Problem: Errors and warnings are not displayed
Solutions:
-
Verify diagnostics are enabled:
:echo g:ricecoder_diagnostics
-
Show diagnostics:
:RiceCoder diagnostics
-
Check for errors:
- Run
:messagesto see error messages - Check ricecoder logs
- Run
-
Enable virtual text:
let g:ricecoder_virtual_text = 1
- Emacs 26.0+
- RiceCoder installed and running
- Package manager (use-package, straight.el, etc.)
Add to your ~/.emacs.d/init.el:
(use-package ricecoder
:ensure t
:config
(ricecoder-mode 1))Add to your ~/.emacs.d/init.el:
(use-package ricecoder
:straight (ricecoder :type git :host github :repo "moabualruz/ricecoder-emacs")
:config
(ricecoder-mode 1))-
Clone the repository:
git clone https://github.com/moabualruz/ricecoder-emacs.git
-
Add to your
~/.emacs.d/init.el:(add-to-list 'load-path "~/ricecoder-emacs") (require 'ricecoder) (ricecoder-mode 1)
Add to your ~/.emacs.d/init.el:
(use-package ricecoder
:ensure t
:config
(setq ricecoder-enabled t)
(setq ricecoder-host "localhost")
(setq ricecoder-port 8080)
(setq ricecoder-timeout 5000)
(setq ricecoder-max-results 50)
;; Enable features
(setq ricecoder-completion-enabled t)
(setq ricecoder-diagnostics-enabled t)
(setq ricecoder-hover-enabled t)
(setq ricecoder-definition-enabled t)
;; Enable mode
(ricecoder-mode 1))Intelligent code completion in emacs.
How to Use:
- Automatic: Completions appear as you type (if configured)
-
Manual: Press
M-/orC-M-ito trigger completion - Select: Use arrow keys to navigate, Enter to select
- Dismiss: Press Escape to dismiss
Configuration:
(setq ricecoder-auto-complete t)
(setq ricecoder-completion-trigger-chars '("." "(" "[" "{"))Example:
fn main() {
let v = vec![1, 2, 3];
v. " Press M-/ for completions
" Completions: iter(), len(), push(), etc.
}Real-time error and warning detection.
How to Use:
- Errors and warnings appear as overlays in the buffer
- Use
M-x ricecoder-next-diagnosticto go to next diagnostic - Use
M-x ricecoder-prev-diagnosticto go to previous diagnostic - Hover over diagnostic to see details
Configuration:
(setq ricecoder-show-diagnostics t)
(setq ricecoder-diagnostics-in-modeline t)Example:
let x: i32 = "string"; " Error overlay
" Hover to see error messageSymbol information on hover.
How to Use:
- Press
C-c C-hto show hover information - Information appears in a popup or separate buffer
- Press Escape to dismiss
Configuration:
(define-key ricecoder-mode-map (kbd "C-c C-h") 'ricecoder-hover)Example:
let result = vec![1, 2, 3];
" Press C-c C-h to see: Vec<i32>Navigate to symbol definitions.
How to Use:
- Press
M-.to go to definition - Press
M-,to go back - Press
M-?to find references
Configuration:
(define-key ricecoder-mode-map (kbd "M-.") 'ricecoder-definition)
(define-key ricecoder-mode-map (kbd "M-,") 'ricecoder-pop-mark)
(define-key ricecoder-mode-map (kbd "M-?") 'ricecoder-references)| Shortcut | Command | Description |
|---|---|---|
| M-/ | Completion | Trigger completion |
| C-M-i | Completion | Trigger completion |
| C-c C-h | Hover | Show hover info |
| M-. | Definition | Go to definition |
| M-, | Back | Go back |
| M-? | References | Find references |
Add to your ~/.emacs.d/init.el:
(define-key ricecoder-mode-map (kbd "C-c r c") 'ricecoder-completion)
(define-key ricecoder-mode-map (kbd "C-c r d") 'ricecoder-definition)
(define-key ricecoder-mode-map (kbd "C-c r h") 'ricecoder-hover)
(define-key ricecoder-mode-map (kbd "C-c r n") 'ricecoder-next-diagnostic)
(define-key ricecoder-mode-map (kbd "C-c r p") 'ricecoder-prev-diagnostic)| Command | Description |
|---|---|
ricecoder-mode |
Toggle ricecoder mode |
ricecoder-completion |
Trigger completion |
ricecoder-hover |
Show hover info |
ricecoder-definition |
Go to definition |
ricecoder-references |
Find references |
ricecoder-diagnostics |
Show all diagnostics |
ricecoder-next-diagnostic |
Go to next diagnostic |
ricecoder-prev-diagnostic |
Go to previous diagnostic |
ricecoder-enable |
Enable ricecoder |
ricecoder-disable |
Disable ricecoder |
ricecoder-restart |
Restart ricecoder |
Problem: Package is not loaded
Solutions:
-
Verify package is installed:
ls ~/.emacs.d/elpa/ricecoder*
-
Check emacs configuration:
- Ensure
~/.emacs.d/init.elis being loaded - Try
M-x load-file ~/.emacs.d/init.el
- Ensure
-
Check for errors:
- Run
M-x view-echo-area-messagesto see error messages - Check emacs logs
- Run
-
Reinstall package:
- Run
M-x package-delete ricecoder - Run
M-x package-install ricecoder
- Run
Problem: Code completions are not appearing
Solutions:
-
Verify completion is enabled:
M-: ricecoder-completion-enabled
-
Check ricecoder is running:
curl http://localhost:8080/health
-
Try manual trigger:
M-/ -
Check for errors:
- Run
M-x view-echo-area-messagesto see error messages - Check ricecoder logs
- Run
-
Increase timeout:
(setq ricecoder-timeout 10000)
Problem: Errors and warnings are not displayed
Solutions:
-
Verify diagnostics are enabled:
M-: ricecoder-diagnostics-enabled
-
Check for errors:
- Run
M-x view-echo-area-messagesto see error messages - Check ricecoder logs
- Run
-
Enable diagnostics display:
(setq ricecoder-show-diagnostics t)
Problem: "Failed to connect to RiceCoder"
Solutions:
-
Verify ricecoder is running:
ricecoder --version ricecoder start
-
Check port configuration:
- Default port is 8080
- Verify port is not in use:
netstat -an | grep 8080 - Change port in configuration if needed
-
Check firewall:
- Ensure firewall allows localhost connections
- Try connecting from terminal:
curl http://localhost:8080/health
-
Check editor logs:
- Vim:
:messages - Emacs:
M-x view-echo-area-messages
- Vim:
-
Restart editor:
- Close and reopen editor
- Or restart ricecoder
Problem: Completions or diagnostics are slow
Solutions:
-
Check system resources:
- Monitor CPU and memory usage
- Close other applications if needed
-
Increase timeout:
- LSP server may be slow
- Increase timeout in configuration
-
Reduce max results:
- Decrease max results in configuration
- Fewer results = faster processing
-
Check LSP server:
- LSP server may be overloaded
- Try restarting ricecoder
-
Disable unused features:
- Disable features you don't use
- Reduces processing overhead
Problem: "Language not supported"
Solutions:
-
Check supported languages:
- Rust, TypeScript, Python are officially supported
- Other languages may have limited support
-
Install LSP server:
- Install LSP server for your language
- Ricecoder will use it automatically
-
Configure custom rules:
- Create custom rules in configuration
- Ricecoder will use them as fallback
-
Use generic fallback:
- Generic fallback works for any language
- Provides basic functionality
-
Reduce max results:
let g:ricecoder_max_results = 25
-
Increase timeout for slow LSP servers:
let g:ricecoder_timeout = 10000
-
Disable unused features:
let g:ricecoder_diagnostics = 0
-
Disable real-time diagnostics:
- Diagnostics will only run on save
-
Increase diagnostic delay:
- Diagnostics will run less frequently
-
Disable for large files:
- Diagnostics can be slow on large files
- IDE Integration Guide - General IDE integration documentation
- VS Code Extension Guide - VS Code-specific setup
- Configuration Guide - Configuration options
- Troubleshooting Guide - General troubleshooting
Last updated: December 9, 2025