Skip to content

Commit

Permalink
docs(advanced-config): correct rust-analyzer settings instruction (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb authored Oct 31, 2023
1 parent cee77f3 commit b3061d4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,10 @@ vim.g.rustaceanvim = {
on_attach = function(client, bufnr)
-- you can also put keymaps in here
end,
-- rust-analyzer language server configuration
['rust-analyzer'] = {
settings = {
-- rust-analyzer language server configuration
['rust-analyzer'] = {
},
},
},
-- DAP configuration
Expand Down
11 changes: 7 additions & 4 deletions doc/rustaceanvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ To configure rustaceanvim, set the variable `vim.g.rustaceanvim`,
which is a `RustaceanOpts` table, in your neovim configuration.

Example:
>

>lua
---@type RustaceanOpts
vim.g.rustaceanvim = {
---@type RustaceanToolsOpts
Expand All @@ -63,8 +64,10 @@ vim.g.rustaceanvim = {
on_attach = function(client, bufnr)
-- Set keybindings, etc. here.
end,
['rust-analyzer'] = {
-- ...
settings = {
-- rust-analyzer language server configuration
['rust-analyzer'] = {
},
},
-- ...
},
Expand All @@ -75,7 +78,7 @@ vim.g.rustaceanvim = {
}
<

Note: `vim.g.rustaceanvim` can also be a function that returns a 'RustaceanOpts' table.
Note: `vim.g.rustaceanvim` can also be a function that returns a `RustaceanOpts` table.


RustaceanOpts *RustaceanOpts*
Expand Down
11 changes: 7 additions & 4 deletions lua/rustaceanvim/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
---which is a `RustaceanOpts` table, in your neovim configuration.
---
---Example:
--->
---
--->lua
------@type RustaceanOpts
---vim.g.rustaceanvim = {
--- ---@type RustaceanToolsOpts
Expand All @@ -21,8 +22,10 @@
--- on_attach = function(client, bufnr)
--- -- Set keybindings, etc. here.
--- end,
--- ['rust-analyzer'] = {
--- -- ...
--- settings = {
--- -- rust-analyzer language server configuration
--- ['rust-analyzer'] = {
--- },
--- },
--- -- ...
--- },
Expand All @@ -33,7 +36,7 @@
--- }
---<
---
---Note: `vim.g.rustaceanvim` can also be a function that returns a 'RustaceanOpts' table.
---Note: `vim.g.rustaceanvim` can also be a function that returns a `RustaceanOpts` table.
---
---@brief ]]

Expand Down

0 comments on commit b3061d4

Please sign in to comment.