Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dotfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Hensel
dotfiles
Commits
c2a862b0
Commit
c2a862b0
authored
6 months ago
by
Jan Hensel
Browse files
Options
Downloads
Patches
Plain Diff
nvim: Replace rust-tools
parent
0b02d9b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.config/nvim/lua/plugins.lua
+23
-5
23 additions, 5 deletions
.config/nvim/lua/plugins.lua
.config/nvim/lua/ztf/configure/rust-tools.lua
+0
-131
0 additions, 131 deletions
.config/nvim/lua/ztf/configure/rust-tools.lua
.config/nvim/lua/ztf/lsp.lua
+0
-17
0 additions, 17 deletions
.config/nvim/lua/ztf/lsp.lua
with
23 additions
and
153 deletions
.config/nvim/lua/plugins.lua
+
23
−
5
View file @
c2a862b0
...
...
@@ -41,8 +41,8 @@ local plugins = {
ensure_installed
=
{
"tinymist"
,
"rust_analyzer"
,
"rust_analyzer"
,
"lua_ls"
,
"gopls"
,
},
},
dependencies
=
{
"williamboman/mason.nvim"
},
...
...
@@ -63,11 +63,29 @@ local plugins = {
},
-- rust
{
'simrat39/rust-tools.nvim'
,
lazy
=
true
,
ft
=
'rust'
,
config
=
function
()
require
'ztf.configure.rust-tools'
end
,
'mrcjkb/rustaceanvim'
,
version
=
'^5'
,
-- Recommended
lazy
=
false
,
-- This plugin is already lazy
dependencies
=
{
'mfussenegger/nvim-dap'
,
'neovim/nvim-lspconfig'
},
-- TODO: somehow might need to add this to setup
--
-- lspconfig.rust_analyzer.setup {
-- -- Other Configs ...
-- settings = {
-- ["rust-analyzer"] = {
-- -- Other Settings ...
-- procMacro = {
-- ignored = {
-- leptos_macro = {
-- -- optional: --
-- -- "component",
-- "server",
-- },
-- },
-- },
-- },
-- }
-- }
},
-- java 🤮
{
...
...
This diff is collapsed.
Click to expand it.
.config/nvim/lua/ztf/configure/rust-tools.lua
deleted
100644 → 0
+
0
−
131
View file @
0b02d9b9
require
(
'rust-tools'
).
setup
{
-- Rust Tools Configuration (from default options) {{{
tools
=
{
-- rust-tools options
-- Automatically set inlay hints (type hints)
autoSetHints
=
true
,
-- TODO: there used to be a setting here (hover_with_actions=true), but
-- it was deprecated in favor of mapping to a command
-- :RustHoverActions instead; done yet?
-- how to execute terminal commands
-- options right now: termopen / quickfix
executor
=
require
(
"rust-tools/executors"
).
termopen
,
runnables
=
{
-- whether to use telescope for selection menu or not
use_telescope
=
false
-- rest of the opts are forwarded to telescope
},
debuggables
=
{
-- whether to use telescope for selection menu or not
use_telescope
=
false
-- rest of the opts are forwarded to telescope
},
-- These apply to the default RustSetInlayHints command
inlay_hints
=
{
-- Only show inlay hints for the current line
only_current_line
=
true
,
-- Event which triggers a refersh of the inlay hints.
-- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd
=
"CursorMoved"
,
-- wheter to show parameter hints with the inlay hints or not
show_parameter_hints
=
true
,
-- prefix for parameter hints
parameter_hints_prefix
=
"<- "
,
-- prefix for all the other hints (type, chaining)
other_hints_prefix
=
"=> "
,
-- whether to align to the length of the longest line in the file
max_len_align
=
true
,
-- padding from the left if max_len_align is true
max_len_align_padding
=
1
,
-- whether to align to the extreme right or not
right_align
=
false
,
-- padding from the right if right_align is true
right_align_padding
=
7
,
-- The color of the hints
highlight
=
"DiagnosticHint"
,
},
hover_actions
=
{
-- the border that is used for the hover window
-- see vim.api.nvim_open_win()
border
=
{
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
},
{
" "
,
"FloatBorder"
}
},
-- whether the hover action window gets automatically focused
auto_focus
=
false
},
-- settings for showing the crate graph based on graphviz and the dot
-- command
crate_graph
=
{
-- Backend used for displaying the graph
-- see: https://graphviz.org/docs/outputs/
-- default: x11
backend
=
"x11"
,
-- where to store the output, nil for no output stored (relative
-- path from pwd)
-- default: nil
output
=
nil
,
-- true for all crates.io and external crates, false only the local
-- crates
-- default: true
full
=
true
,
}
},
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
server
=
{
cmd
=
{
"rust-analyzer"
},
filetypes
=
{
"rust"
},
settings
=
{
[
"rust-analyzer"
]
=
{
checkOnSave
=
{
allFeatures
=
true
,
overrideCommand
=
{
"cargo"
,
"clippy"
,
"--workspace"
,
"--all-targets"
,
"--message-format=json"
,
},
},
},
},
},
-- debugging stuff
dap
=
{
adapter
=
{
type
=
'executable'
,
command
=
'lldb-vscode'
,
name
=
"rt_lldb"
}
}
-- }}}
}
This diff is collapsed.
Click to expand it.
.config/nvim/lua/ztf/lsp.lua
+
0
−
17
View file @
c2a862b0
...
...
@@ -114,20 +114,3 @@ if not configs.muddles then
}
end
lspconfig
.
muddles
.
setup
{}
lspconfig
.
rust_analyzer
.
setup
{
-- Other Configs ...
settings
=
{
[
"rust-analyzer"
]
=
{
-- Other Settings ...
procMacro
=
{
ignored
=
{
leptos_macro
=
{
-- optional: --
-- "component",
"server"
,
},
},
},
},
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment