File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,34 @@ Task] instead:
71
71
72
72
[ Build Task ] : https://code.visualstudio.com/docs/editor/tasks
73
73
74
+
75
+ ## Configuring ` ctags `
76
+
77
+ One of the challenges with rustc is that the RLS can't handle it, since it's a
78
+ bootstrapping compiler. This makes code navigation difficult. One solution is to
79
+ use ` ctags ` .
80
+
81
+ ` ctags ` has a long history and several variants. Exuberant Ctags seems to be
82
+ quite commonly distributed but it does not have out-of-box Rust support. Some
83
+ distributions seem to use [ Universal Ctags] [ utags ] , which is a maintained fork
84
+ and does have built-in Rust support.
85
+
86
+ The following script can be used to set up Exuberant Ctags:
87
+ [ https://github.com/nikomatsakis/rust-etags ] [ etags ] .
88
+
89
+ ` ctags ` integrates into emacs and vim quite easily. The following can then be
90
+ used to build and generate tags:
91
+
92
+ ``` console
93
+ $ rust-ctags src/lib* && ./x.py build < something>
94
+ ```
95
+
96
+ This allows you to do "jump-to-def" with whatever functions were around when
97
+ you last built, which is ridiculously useful.
98
+
99
+ [ etags ] : https://github.com/nikomatsakis/rust-etags
100
+ [ utags ] : https://github.com/universal-ctags/ctags
101
+
74
102
## Check, check, and check again
75
103
76
104
When doing simple refactorings, it can be useful to run ` ./x.py check `
You can’t perform that action at this time.
0 commit comments