File: position_encoding_kind.rb

package info (click to toggle)
ruby-language-server-protocol 3.17.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,636 kB
  • sloc: ruby: 10,741; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module LanguageServer
  module Protocol
    module Constant
      #
      # A type indicating how positions are encoded,
      # specifically what column offsets mean.
      # A set of predefined position encoding kinds.
      #
      module PositionEncodingKind
        #
        # Character offsets count UTF-8 code units (e.g bytes).
        #
        UTF8 = 'utf-8'
        #
        # Character offsets count UTF-16 code units.
        #
        # This is the default and must always be supported
        # by servers
        #
        UTF16 = 'utf-16'
        #
        # Character offsets count UTF-32 code units.
        #
        # Implementation note: these are the same as Unicode code points,
        # so this `PositionEncodingKind` may also be used for an
        # encoding-agnostic representation of character offsets.
        #
        UTF32 = 'utf-32'
      end
    end
  end
end