How to use the atom.Range function in atom

To help you get started, we’ve selected a few atom 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 TypeStrong / atom-typescript / lib / main / atom / autoCompleteProvider.ts View on Github external
function getLastNonWhitespaceChar(buffer: Atom.TextBuffer, pos: Atom.Point): string | undefined {
  let lastChar: string | undefined
  const range = new Atom.Range([0, 0], pos)
  buffer.backwardsScanInRange(
    /\S/,
    range,
    ({matchText, stop}: {matchText: string; stop: () => void}) => {
      lastChar = matchText
      stop()
    },
  )
  return lastChar
}
github TypeStrong / atom-typescript / dist / main / atom / autoCompleteProvider.js View on Github external
function getLastNonWhitespaceChar(buffer, pos) {
    let lastChar;
    const range = new Atom.Range([0, 0], pos);
    buffer.backwardsScanInRange(/\S/, range, ({ matchText, stop }) => {
        lastChar = matchText;
        stop();
    });
    return lastChar;
}
function containsScope(scopes, matchScope) {
github heilhead / es-identifier-highlight / lib / view.js View on Github external
_getRange(start, end) {
        let buf = this._editor.getBuffer();

        return new Range(
            buf.positionForCharacterIndex(start),
            buf.positionForCharacterIndex(end)
        );
    }
github t9md / atom-narrow / lib / composition-provider / scan.js View on Github external
function itemize (text, row) {
  const point = new Point(row, 0)
  return {
    text: text,
    point: point,
    range: new Range(point, point)
  }
}
github t9md / atom-narrow / lib / provider / scan.js View on Github external
function itemize (text, row) {
  const point = new Point(row, 0)
  return {
    text: text,
    point: point,
    range: new Range(point, point)
  }
}

atom

shared, synchronous, independent state for javascript apps

ISC
Latest version published 8 months ago

Package Health Score

53 / 100
Full package analysis