-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable autoimport #1505
Comments
@GNSubrahmanyam you can try the following settings:
|
@snjeza In that case no auto complete is coming. We need autocomplete. We want to disable auto import statements |
It's not possible to disable automatic type import at that point. Can you explain how auto import is a problem in monaco? |
@fbricon Is there any way to suggest method autocomplete for imported packages only? |
@fbricon Any updates how we can achieve this? |
@fbricon Found a solution import { has, get, map, omit, set} from "lodash";
import * as rpc from "vscode-ws-jsonrpc";
export const launch = (request: http.IncomingMessage, socket: rpc.IWebSocket) => {
if (rpc.isResponseMessage(message)) {
if (typeof message.result === 'object' && has(message.result, 'isIncomplete')) {
let items = map(get(message.result, 'items'), (item) => {
if (has(item, 'additionalTextEdits')) {
item = omit(item, 'additionalTextEdits')
return item;
}
return item;
})
set(message.result, 'items', items)
}
} |
interesting, where do you put that code? |
Am i doing right ? By omitting |
that's very, very hacky. I'm not sure but other things than import statements might be sent as additional textedits. |
True, In our case we don't want auto import. What are other alternative to achieve this ? |
@GNSubrahmanyam Hi can you please help me with the configs used to make it work with monaco-languageclient? to make it work with -- this java lsp. And do we need any other chnages? |
@fbricon @snjeza
Editor: Monaco editor
language client: Monaco language client
In our use case we want to disable autoimport. How to stop sending completionItem/resolve
The text was updated successfully, but these errors were encountered: