- Via Home Manager
Using Home Manager, you can use the github url as an input and pass it to your nvim config.
Set ecsls.packages.${conf.system}.default within the neovim.extraPackages
option and refer to the neovim configuration after the dependencie section.
- Development packages are provided throught
nix develop.
- Install
banana-verapackage if existing, or you compile it by yourself.
You need to clone the repo of the coding style of EPITECH. If you do not have access to this repo, we are sorry but you will not be able to use this LSP, as it is required for this to run, and is internal to Epitech.
git submodules update --init --recursiveor
git clone https://github.com/Epitech/banana-coding-style-checker.git <path>(optional) Create a virtual environement (avoid polluting your python).
python -m venv venvInstall the package locally.
venv/bin/pip install .Note If you are using virtual environments, don't forget to add the correct path for the command in your LSP config
To activate the language server using lspconfig, use the following configuration:
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
-- ↓ Epitech C Style Checker
if not configs.ecsls then
configs.ecsls = {
default_config = {
root_dir = lspconfig.util.root_pattern('.git', 'Makefile'),
cmd = { 'ecsls_run' },
autostart = true,
name = 'ecsls',
filetypes = { 'c', 'cpp', 'make' },
},
}
end
lspconfig.ecsls.setup({})Note If you want to use it globally, or if you wish to change the vera rules directory, change
pathin by usinginit_options.
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
-- ↓ Epitech C Style Checker
if not configs.ecsls then
configs.ecsls = {
default_config = {
root_dir = lspconfig.util.root_pattern('.git', 'Makefile'),
cmd = { 'ecsls_run' },
autostart = true,
name = 'ecsls',
filetypes = { 'c', 'cpp', 'make' },
init_options = {
path = "/your/custom/path";
};
},
}
end
lspconfig.ecsls.setup({})Warning The path must be valid and pointing to the epitech ruleset repository root.
path = ".../ls/banana" # invalid
path = ".../ls/banana-coding-style-checker/vera" # invalid too
path = ".../ls/banana-coding-style-checker" # validNote If you are using nix with home manager, the ruleset with already be bundled as long as you have a SSH key linked to your github account.
To see a configuration in more details, consider reading my dotfiles.
