https://github.com/odoo/odoo-neovim
https://github.com/odoo/odoo-neovim
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/odoo/odoo-neovim
- Owner: odoo
- Created: 2025-08-13T14:58:30.000Z (10 months ago)
- Default Branch: main-default-whe
- Last Pushed: 2025-08-19T13:49:19.000Z (10 months ago)
- Last Synced: 2025-09-10T22:03:37.720Z (9 months ago)
- Size: 1000 Bytes
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Neovim
Neovim client for the Odools language server

## Important ⚠️
This plugin is still in its early development stage. Don't hesitate to submit bugs, issues and/or
feedbacks to improve the user experience.
This repository give some snippet example to make the [odoo-ls](https://github.com/odoo/odoo-ls)
working inside Neovim.
This will later become a true plugin managing the download of the server executable and dependencies
## Requirements
We recommend using nvim version `0.11.0` or later to benefit from the builtin lsp config helpers.
Working with `< 0.11` will require installing [lspconfig](https://github.com/neovim/nvim-lspconfig)
## Configs
There are 2 configuration parts needed. One for the server directly, and one for neovim. This
later should be integrated in the future plugin.
### odools.toml
```toml
name = "main"
odoo_path = "odoo"
addons_path = ["/home/user/src/enterprise"]
python_path = "/home/user/.pyenv/shims/python"
additional_stubs = ["/home/user/.local/nvim/odoo/typeshed/stubs"]
```
### nvim
The server need a bit of configuration to work smothly with neovim. Here is the minimal suggested config.
```lua
-- Defined in /lsp/odools.lua
local server = '/home/user/.local/share/nvim/odoo/odoo_ls_server'
-- Get the default client capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
-- Add your custom capability
capabilities.general.markdown = {
parser = 'marked',
version = ''
}
return {
cmd = {server, '--stdlib', vim.fn.fnamemodify(server, ':h') .. '/typeshed/stdlib'},
root_dir = '/home/whe/.local/share/nvim/odoo',
filetypes = { 'python' },
workspace_folders = {{
uri = vim.uri_from_fname('/home/whe/src'),
name = 'main_folder',
}},
capabilities = capabilities,
settings = {
Odoo = {
selectedProfile = 'main',
}
},
}
```