Home

tailwind-ctp-intellisense @62b30d5da2d1125d174933e18f8ebf8423df2eb1 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / src / lsp / util / absoluteRange.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import { Range } from 'vscode-languageserver'

export function absoluteRange(range: Range, reference?: Range) {
  return {
    start: {
      line: (reference?.start.line || 0) + range.start.line,
      character:
        (range.end.line === 0 ? reference?.start.character || 0 : 0) +
        range.start.character,
    },
    end: {
      line: (reference?.start.line || 0) + range.end.line,
      character:
        (range.end.line === 0 ? reference?.start.character || 0 : 0) +
        range.end.character,
    },
  }
}