Skip to content

Whenrow/odoo-ls.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odools x Neovim

Neovim client for the Odools language server

screenshot

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.

Installation

requirement

We recommend using nvim version 0.9.0 or later. This plugin is using lspconfig to connect communicate with the language server in your beloved editor.

downloads

  1. Install the plugin

Using packer.nvim

use {
  'whenrow/odoo-ls.nvim',
   requires = { {'neovim/nvim-lspconfig'} }
}

Using lazy.nvim

-- init.lua:
    {
    'whenrow/odoo-ls.nvim',
    dependencies = { 'neovim/nvim-lspconfig' }
    }

-- plugins/odoo.lua:
return {
    'whenrow/odoo-ls.nvim',
      dependencies = { 'neovim/nvim-lspconfig' }
    }
  1. Download the server executable from the release assets
wget -O ~/.local/bin/odoo_ls_server https://github.com/odoo/odoo-ls/releases/download/0.4.0/odoo_ls_server
  1. downloads python typeshed to enrich the server with builtin python package stubs

(2. and 3. can be done automatically via the Odools command)

Configuration

The plugin needs different local path and executable to be working. Here is the mandatory config keys.

local odools = require('odools')
local h = os.getenv('HOME')
odools.setup({
    -- mandatory
    odoo_path = h .. "/src/odoo/",
    python_path = h .. "/.pyenv/shims/python3",

    -- optional
    server_path = h .. "/.local/bin/odoo_ls_server",
    addons = {h .. "/src/enterprise/"},
    additional_stubs = {h .. "/src/additional_stubs/", h .. "/src/typeshed/stubs"},
    root_dir = h .. "/src/", -- working directory, odoo_path if empty
    settings = {
        autoRefresh = true,
        autoRefreshDelay = nil,
        diagMissingImportLevel = "none",
    },
})

Usage

Try the command :Odools install to fetch the language server executable from Github as well as the python typesheds

About

Neovim client for odoo-ls LSP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages