File: insert_text_mode.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 (30 lines) | stat: -rw-r--r-- 1,009 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
module LanguageServer
  module Protocol
    module Constant
      #
      # How whitespace and indentation is handled during completion
      # item insertion.
      #
      module InsertTextMode
        #
        # The insertion or replace strings is taken as it is. If the
        # value is multi line the lines below the cursor will be
        # inserted using the indentation defined in the string value.
        # The client will not apply any kind of adjustments to the
        # string.
        #
        AS_IS = 1
        #
        # The editor adjusts leading whitespace of new lines so that
        # they match the indentation up to the cursor of the line for
        # which the item is accepted.
        #
        # Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
        # multi line completion item is indented using 2 tabs and all
        # following lines inserted will be indented using 2 tabs as well.
        #
        ADJUST_INDENTATION = 2
      end
    end
  end
end