Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.

Commit 2d9deba

Browse files
committed
Limit autocmd to rust files
1 parent 6350ad9 commit 2d9deba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@ nnoremap <Leader>t :lua require'lsp_extensions'.inlay_hints{ only_current_line =
3030
Run on showing file or new file in buffer:
3131

3232
```vimscript
33-
autocmd! * <buffer>
34-
autocmd BufEnter,BufWinEnter,TabEnter <buffer> :lua require'lsp_extensions'.inlay_hints{}
33+
autocmd BufEnter,BufWinEnter,TabEnter *.rs :lua require'lsp_extensions'.inlay_hints{}
3534
```
3635

3736
On cursor hover, get hints for current line:
3837

3938
```vimscript
40-
autocmd CursorHold,CursorHoldI <buffer> :lua require'lsp_extensions'.inlay_hints{ only_current_line = true }
39+
autocmd CursorHold,CursorHoldI *.rs :lua require'lsp_extensions'.inlay_hints{ only_current_line = true }
4140
```
4241

4342
Available Options (Showing defaults):

0 commit comments

Comments
 (0)