Skip to content

Commit

Permalink
Optimize rust-analyzer configs
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Oct 31, 2024
1 parent 25c0b93 commit a17c07d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
3 changes: 3 additions & 0 deletions trees/uts-002F.tree
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Other first aid key mappings or commands available in LunarVim:
- `x` to cut, `c` to copy, `p` to paste
- `a` to create a file, `d` to delete, `r` to rename
- `H` to toggle hidden files
- `Y` to copy relative path, `gy` to copy absolute path
- `s` to open in system file explorer
- `g?` for help, `q` to quit, `R` to refresh
- `hjkl` to move up/down, collapse/expand
- it will automatically follow the current file
Expand Down Expand Up @@ -279,6 +281,7 @@ It's very important to stay in the flow and Zen mode as much as possible. Split
- **d**ebug, **f**ix, co**m**mit log, **n**aming etc.
- `?` to select the model
- `C-s` to send the prompt
- `:help copilot` to learn more
- Avante
- `<leader>+aa` to open the chat, use `a` to accept individual suggestions, or `A` to accept all
- select code and `<leader>+ae` to modify code
Expand Down
37 changes: 30 additions & 7 deletions uts-plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,36 @@ local plugins = {
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
-- ft = { "rust" },
-- config = function()
-- vim.g.rustaceanvim = {
-- server = {
-- on_attach = require("lvim.lsp").common_on_attach
-- },
-- }
-- end,
config = function()
vim.g.rustaceanvim = {
-- server = {
-- on_attach = require("lvim.lsp").common_on_attach,
-- },
server = {
default_settings = {
-- rust-analyzer language server configuration
["rust-analyzer"] = {
checkOnSave = {
enable = true,
command = "clippy",
},
cargo = {
buildScripts = {
enable = false,
},
},
procMacro = {
enable = false,
},
cachePriming = {
enable = true,
numThreads = 4,
},
},
},
},
}
end,
},
{
"github/copilot.vim",
Expand Down

0 comments on commit a17c07d

Please sign in to comment.