Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomtomjhj/coq-lsp.nvim
Neovim client for coq-lsp
https://github.com/tomtomjhj/coq-lsp.nvim
coq neovim
Last synced: about 1 month ago
JSON representation
Neovim client for coq-lsp
- Host: GitHub
- URL: https://github.com/tomtomjhj/coq-lsp.nvim
- Owner: tomtomjhj
- License: mit
- Created: 2023-02-12T12:04:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T13:37:08.000Z (9 months ago)
- Last Synced: 2024-09-30T20:41:20.668Z (about 2 months ago)
- Topics: coq, neovim
- Language: Lua
- Homepage:
- Size: 34.2 KB
- Stars: 21
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coq-lsp.nvim
A simple Neovim client for [`coq-lsp`](https://github.com/ejgallego/coq-lsp/).## Prerequisites
* [Latest stable version of Neovim](https://github.com/neovim/neovim/releases/tag/stable)
* [`coq-lsp`](https://github.com/ejgallego/coq-lsp/#%EF%B8%8F-installation)## Setup
```vim
Plug 'neovim/nvim-lspconfig'
Plug 'whonore/Coqtail' " for ftdetect, syntax, basic ftplugin, etc
Plug 'tomtomjhj/coq-lsp.nvim'...
" Don't load Coqtail
let g:loaded_coqtail = 1
let g:coqtail#supported = 0" Setup coq-lsp.nvim
lua require'coq-lsp'.setup()
```## Interface
* coq-lsp.nvim uses Neovim's built-in LSP client and nvim-lspconfig.
See [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim/)
for basic example configurations for working with LSP.
* On cursor movement, it asynchronously displays the goals for the position of cursor on the auxiliary panel.
* `:CoqLsp` command
* `:CoqLsp open_info_panel`: Open the info panel for the current buffer.
* `:CoqLsp saveVo`: Save the `.vo` file for the current buffer.
* [Commands from nvim-lspconfig](https://github.com/neovim/nvim-lspconfig#commands)
work as expected.
For example, run `:LspRestart` to restart `coq-lsp`.## Configurations
```lua
require'coq-lsp'.setup {
-- The configuration for coq-lsp.nvim.
-- The following is the default configuration.
coq_lsp_nvim = {
-- to be added
},-- The configuration forwarded to `:help lspconfig-setup`.
-- The following is an example.
lsp = {
on_attach = function(client, bufnr)
-- your mappings, etc
end,
-- coq-lsp server initialization configurations, defined here:
-- https://github.com/ejgallego/coq-lsp/blob/main/editor/code/src/config.ts#L3
-- Documentations are at https://github.com/ejgallego/coq-lsp/blob/main/editor/code/package.json.
init_options = {
show_notices_as_diagnostics = true,
},
autostart = false, -- use this if you want to manually launch coq-lsp with :LspStart.
},
}
```NOTE:
Do not call `lspconfig.coq_lsp.setup()` yourself.
`require'coq-lsp'.setup` does it for you.## Features not implemented yet
* Fancy proofview rendering
* Make lspconfig optional## See also
* [coq.ctags](https://github.com/tomtomjhj/coq.ctags) for go-to-definition.
* [vscoq.nvim](https://github.com/tomtomjhj/vscoq.nvim) for `vscoqtop` client.