Skip to content

Commit 03861ed

Browse files
Matthieu Coudronteto
authored andcommitted
feat: rework documentation
Introduces new sections: - lsp - treesitter - lua resources
1 parent 5ce62c0 commit 03861ed

File tree

6 files changed

+138
-1
lines changed

6 files changed

+138
-1
lines changed

_data/nav.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
url: https://github.com/neovim/neovim
1414
- title: Documentation
1515
url: /doc/
16+
sections:
17+
- title: General
18+
url: /doc/general
19+
- title: Lua resources
20+
url: /doc/lua-resources
21+
- title: LSP
22+
url: /doc/lsp
23+
- title: Tree-sitter
24+
url: /doc/treesitter
1625
- title: Forum
1726
url: http://discourse.neovim.io
1827
- title: Sponsors

doc/developer.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: default
3+
title: Developer documentation
4+
---
5+
6+
{% include nav.html active='Documentation' %}
7+
8+
<section class="front-section">
9+
<div class="container">
10+
<h1>Documentation</h1>
11+
</div>
12+
<div class="container golden-grid">
13+
<div>
14+
<h2>Developer</h2>
15+
16+
<h3><a href="https://neovim.io/doc/user/develop.html#dev"><code>:help dev</code></a></h3>
17+
<p>
18+
Design constraints and guidelines, for developing Nvim applications or Nvim itself.
19+
</p>
20+
21+
<h3><a href="https://github.com/neovim/neovim/wiki#developers">Developer Wiki</a></h3>
22+
<p>
23+
Notes on building, navigating, and debugging.
24+
</p>
25+
<h3><a href="/doc/dev/files.html">Source documentation</a></h3>
26+
<p>
27+
Generated from source code docstrings.
28+
</p>
29+
<h3><a href="https://sourcegraph.com/github.com/neovim/neovim">SourceGraph</a></h3>
30+
<p>
31+
Navigate the Nvim source code online.
32+
</p>
33+
</div>
34+
</div>
35+
</section>
36+

doc_index.html renamed to doc/general.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
layout: default
33
title: Documentation
4-
canonical_url: /doc/
54
---
65

76
{% include nav.html active='Documentation' %}

doc/lsp.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: default
3+
title: LSP documentation
4+
---
5+
6+
{% include nav.html active='Documentation' %}
7+
8+
<section class="front-section">
9+
<div class="container">
10+
<h1>Language Server Protocol Documentation</h1>
11+
</div>
12+
<div class="container golden-grid">
13+
<div>
14+
<h2>What is the Language Server Protocol ?</h2>
15+
<p>
16+
<a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol (LSP)</a> is an open, JSON-RPC-based protocol for communication between source code editors and language servers, which provide programming language-specific features such as:
17+
18+
<ul>
19+
<li>Go to definition</li>
20+
<li>(auto)completion</li>
21+
<li>Code Actions (automatic formatting, organize imports, ...)</li>
22+
<li>Show method signatures</li>
23+
<li>Show/go to references</li>
24+
<li>Snippets</li>
25+
</ul>
26+
</p>
27+
28+
<p>
29+
Starting with version 0.5, neovim natively supports this protocol.
30+
To enjoy these features, you need to install and configure a LSP server for the languages you are interested in.
31+
The neovim organization maintains a list of configurations in the <a href="https://github.com/neovim/nvim-lspconfig">nvim-lspconfig plugin</a>.
32+
The repository contains instructions to setup and troubleshoot many servers.
33+
</p>
34+
</div>
35+
</div>
36+
</section>

doc/lua-resources.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: default
3+
title: Lua resources
4+
---
5+
6+
{% include nav.html active='Documentation' %}
7+
8+
<section class="front-section">
9+
<div class="container">
10+
<h1>Lua resources</h1>
11+
</div>
12+
<div class="container golden-grid">
13+
<div>
14+
<h2>Where to look for lua guidance ?</h2>
15+
<p>
16+
Lua support improves with every release. Neovim 0.5 can for instance load its configuration from an init.lua instead of the traditional init.vim.
17+
The lua ecosystem around neovim is thrilling and so we list here a few resources to help you get started:
18+
<ul>
19+
<li>A <a href="https://github.com/nanotee/nvim-lua-guide">starting guide</a> for lua and neovim</a></li>
20+
<li>This <a href="https://neovim.discourse.group/t/the-300-line-init-lua-challenge/227">forum post</a> lists several &lt;300 lines of code init.lua</a></li>
21+
</ul>
22+
23+
and of course the exhaustive `:help lua`.
24+
</p>
25+
</div>
26+
</div>
27+
</section>
28+

doc/treesitter.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
layout: default
3+
title: Tree-sitter documentation
4+
---
5+
6+
{% include nav.html active='Documentation' %}
7+
8+
<section class="front-section">
9+
<div class="container">
10+
<h1>Tree-sitter documentation</h1>
11+
</div>
12+
<div class="container golden-grid">
13+
<div>
14+
<h2>What is tree-sitter ?</h2>
15+
<p>
16+
Neovim 0.5 adds experimental support for tree-sitter, a tool that serves as a parsing library. Parsing your code into a syntax tree allows for manipulating the structure of your code in a more intelligent way than is currently possible with regular expressions. This allows for improved (and faster):
17+
<ul>
18+
<li>syntax highlighting</li>
19+
<li>code navigation</li>
20+
<li>refactoring</li>
21+
<li>text objects and motions</li>
22+
</ul>
23+
See the tree-sitter <a href="https://tree-sitter.github.io/tree-sitter/">official website</a> for more details.
24+
The support is experimental but if you feel adventurous, you can use <a href="https://github.com/nvim-treesitter/nvim-treesitter">the following plugin</a> to install the language-specific tree-sitter grammars.
25+
</p>
26+
</div>
27+
</div>
28+
</section>
29+

0 commit comments

Comments
 (0)