You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 19, 2025. It is now read-only.
like this and added to the `extensions` array in the setup
113
-
of your CodeMirror instance.
114
-
115
-
```ts
116
-
tsLinter();
117
-
```
118
-
119
-
This uses the [@codemirror/lint](https://codemirror.net/docs/ref/#lint)
120
-
package and grabs diagnostics from the TypeScript environment.
121
-
122
-
_If you want to modify how lints are handled, you can use
123
-
the `getLints({ env, path })` method and wire it up with
124
-
CodeMirror's linter method yourself._
125
-
126
-
### Autocompletion
127
-
128
-
To make it possible to combine different autocompletion
129
-
sources, we expose a [`CompletionSource`](https://codemirror.net/docs/ref/#autocomplete.autocompletion) which you can use with the CodeMirror `autocomplete` method:
130
-
131
-
```ts
132
-
autocompletion({
133
-
override: [tsAutocomplete()],
134
-
});
135
-
```
136
-
137
-
_We expose a lower-level interface to autocompletions with the
138
-
`getAutocompletion({ env, path, context })` method that takes
139
-
a `CompletionContext` parameter._
140
-
141
-
### Hover
142
-
143
-
The hover definition can be used like the following:
144
-
145
-
```ts
146
-
tsHover();
147
-
```
148
-
149
-
Which automatically uses a default renderer. However, you can
150
-
customize this to your heart's content, and use your web framework
151
-
to render custom UI if you want to, using the `renderTooltip` option.
0 commit comments