How to use the atom-languageclient.Convert.lsRangeToAtomRange function in atom-languageclient

To help you get started, we’ve selected a few atom-languageclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rianneogi / ide-cquery / lib / main.js View on Github external
type: "text",
              class: "cquery--namespace"
            }
          }
          else if(data.symbols[i].kind==SymbolKind.Macro)
          {
            options = {
              type: "text",
              class: "cquery--macro"
            }
          }
          
          for(let j = 0;j
github spring-projects / sts4 / atom-extensions / atom-spring-boot / lib / main.js View on Github external
createHintMarker(editor, range) {
        // Create marker model
        const marker = editor.markBufferRange(Convert.lsRangeToAtomRange(range), BOOT_DATA_MARKER_TYPE);

        // Marker around the text in the editor
        editor.decorateMarker(marker, {
            type: 'highlight',
            class: 'boot-hint'
        });

        // Marker in the diagnostic gutter
        let gutter = editor.gutterWithName(BOOT_HINT_GUTTER_NAME);
        if (!gutter) {
            gutter = editor.addGutter({
                name: BOOT_HINT_GUTTER_NAME,
                visible: false,
            });
        }
        const iconElement = document.createElement('span');
github spring-projects / sts4 / atom-extensions / atom-spring-boot / lib / boot-sts-adapter.ts View on Github external
private createHintMarker(editor: TextEditor, range: Range) {
        // Create marker model
        const marker = editor.markBufferRange(Convert.lsRangeToAtomRange(range));

        // Marker around the text in the editor
        editor.decorateMarker(marker, DECORATION_OPTIONS);

        // Marker in the diagnostic gutter
        // let gutter = editor.gutterWithName(BOOT_HINT_GUTTER_NAME);
        // if (!gutter) {
        //     gutter = editor.addGutter({
        //         name: BOOT_HINT_GUTTER_NAME,
        //         visible: false,
        //     });
        // }
        // const iconElement = document.createElement('span');
        // iconElement.setAttribute('class', 'gutter-boot-hint');
        // gutter.decorateMarker(marker, {item: iconElement});
    }
github Gert-dev / php-ide-serenata / lib / CodeLensManager.js View on Github external
codeLenses.forEach((codeLens) => {
            if (!codeLens.command) {
                // To support this, one would have to send a resolve request and show some sort of placeholder
                // beforehand, as we wouldn't know what title to show yet.
                throw new Error('Code lenses with unresolved commands are currently not supported');
            }

            const range = Convert.lsRangeToAtomRange(codeLens.range);
            const paddingSpacesNeeded = range.start.column - charactersTaken;

            // Having one marker per line  (see above) means that we need to do padding ourselves when multiple code
            // lenses are present. This can happen in cases where multiple properties are on one line, and more than one
            // of them is an override. ot great, but it gets the job done.
            const paddingSpanElement = document.createElement('span');
            paddingSpanElement.innerHTML = ' '.repeat(paddingSpacesNeeded);

            const anchorElement = document.createElement('a');
            anchorElement.innerHTML = codeLens.command.title;
            anchorElement.classList.add('badge');
            anchorElement.classList.add('badge-small');
            anchorElement.href = '#';
            anchorElement.addEventListener('click', () => {
                executeCommandHandler({
                    command: codeLens.command.command,