Open shawnohare opened 6 years ago
Could be caused by either bad regex, or the language servers not responding themselves.
It works for tsserver
, so the problem will either be some difference in LSP, or the servers not responding if there are trailing characters. I can fix the former, but can't do anything about the latter.
I will try to inspect the ALE source, but I am not intimately familiar with vimL. Is there a way from within ALE to create debugging logs to see what the server responds with?
I tried this with the bash-language-server
on some bash scripts, and other than some issues with the language server not starting on minimal example files, the completion worked inside delimiters.
The ALE
source appears to handle python and shell the same with respect to regexes, so this difference is likely a language-server difference.
The best way to debug LSP programming is to run ALE in Vim 8.0 or above, and to use the ch_logfile
function to log everything.
I'm posting the results of ch_logfile
while attempting to complete HELLO
in the Python example above. This is mostly as a note, since I lack the LSP experience to truly parse the results, and will have to acquaint myself further with the protocol.
==== start log session ====
2.738150 : Starting job: /bin/zsh -c '/Users/shawn/.local/opt/pyenv/versions/3.7.0/envs/examples/bin/pyls'
2.738227 on 1: Created channel
2.739876 SEND on 1(in): 'Content-Length: 218
{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"initializationOptions":{},"rootUri":"file:///Users/shawn/src/python/examples","capabilities":{},"rootPath":"/Users/shawn/src/python/examples","processId":13551}}'
2.773741 : looking for messages on channels
2.951731 RECV on 1(err): '2018-12-10 12:19:24,147 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'autopep8': No module named 'autopep8'
'
2.951737 on 1: Dropping message '2018-12-10 12:19:24,147 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'autopep8': No module named 'autopep8'
'
2.989559 RECV on 1(err): '2018-12-10 12:19:24,185 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pyflakes': No module named 'pyflakes'
'
2.989565 : looking for messages on channels
2.989604 on 1: Dropping message '2018-12-10 12:19:24,185 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pyflakes': No module named 'pyflakes'
'
3.011729 RECV on 1(err): '2018-12-10 12:19:24,208 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'yapf': No module named 'yapf'
'
3.011734 : looking for messages on channels
3.011761 on 1: Dropping message '2018-12-10 12:19:24,208 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'yapf': No module named 'yapf'
'
3.198145 RECV on 1(out): 'Content-Length: 605
Content-Type: application/vscode-jsonrpc; charset=utf8
{"jsonrpc": "2.0", "id": 1, "result": {"capabilities": {"codeActionProvider": true, "codeLensProvider": {"resolveProvider": false}, "completionProvider": {"resolveProvider": false, "triggerCharacters": ["."]}, "documentFormattingProvider": true, "documentHighlightProvider": true, "documentRangeFormattingProvider": true, "documentSymbolProvider": true, "definitionProvider": true, "executeCommandProvider": {"commands": []}, "hoverProvider": true, "referencesProvider": true, "renameProvider": true, "signatureHelpProvider": {"triggerCharacters": ["(", ","]}, "textDocumentSync": 2, "experimental": {}}}}'
3.198151 : looking for messages on channels
3.198183 on 1: Invoking channel callback <SNR>62_VimOutputCallback
3.198511 SEND on 1(in): 'Content-Length: 224
{"method":"textDocument/didOpen","jsonrpc":"2.0","params":{"textDocument":{"uri":"file:///Users/shawn/src/python/examples/ale.py","version":1,"languageId":"python","text":"HELLO = 'hello'\n\n\ndef main():\n print(H)\n"}}}'
3.198808 SEND on 1(in): 'Content-Length: 226
{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"HELLO = 'hello'\n\n\ndef main():\n print(HE)\n"}],"textDocument":{"uri":"file:///Users/shawn/src/python/examples/ale.py","version":2}}}'
3.199162 SEND on 1(in): 'Content-Length: 179
{"method":"textDocument/completion","jsonrpc":"2.0","id":2,"params":{"textDocument":{"uri":"file:///Users/shawn/src/python/examples/ale.py"},"position":{"character":13,"line":4}}}'
3.396843 RECV on 1(out): 'Content-Length: 21289
Content-Type: application/vscode-jsonrpc; charset=utf8
{"jsonrpc": "2.0", "id": 2, "result": {"isIncomplete": false, "items": [{"label": "and", "kind": 14, "detail": "", "documentation": "Boolean operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\n\u00a0\u00a0 or_test\u00a0\u00a0::= and_test | or_test \"or\" and_test\n\u00a0\u00a0 and_test ::= not_test | and_test \"and\" not_test\n\u00a0\u00a0 not_test ::= comparison | \"not\" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: \"False\", \"None\", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).\u00a0\u00a0All other values are interpreted\nas true.\u00a0\u00a0User-defined objects can customize their truth value by\nproviding a \"__bool__()\" method.\n\nThe operator \"not\" yields \"True\" if its argument is false, \"False\"\notherwise.\n\nThe expression \"x and y\" first evaluates \\*x\\*; if \\*x\\* is false, its\nvalue is returned; otherwise, \\*y\\* is evaluated and the resulting value\nis returned.\n\nThe expression \"x or y\" first evaluates \\*x\\*; if \\*x\\* is true, its value\nis returned; otherwise, \\*y\\* is evaluated and the resulting value is\nreturned.\n\n(Note that neither \"and\" nor \"or\" restrict the value and type they\nreturn to \"False\" and \"True\", but rather return the last evaluated\nargument.\u00a0\u00a0This is sometimes useful, e.g., if \"s\" is a string that\nshould be replaced by a default value if it is empty, the expression\n\"s or 'foo'\" yields the desired value.\u00a0\u00a0Because \"not\" has to create a\nnew value, it returns a boolean value regardless of the type of its\nargument (for example, \"not 'foo'\" produces \"False\" rather than \"''\".)", "sortText": "aand", "insertText": "and"}, {"label": "if", "kind": 14, "detail": "", "documentation": "The \"if\" statement\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\nThe \"if\" statement is used for conditional execution:\n\n\u00a0\u00a0 if_stmt ::= \"if\" expression \":\" suite\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ( \"elif\" expression \":\" suite )\\*\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [\"else\" \":\" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section Boolean operations\nfor the definition of true and false); then that suite is executed\n(and no other part of the \"if\" statement is executed or evaluated).\nIf all expressions are false, the suite of the \"else\" clause, if\npresent, is executed.", "sortText": "aif", "insertText": "if"}, {"label": "in", "kind": 14, "detail": "", "documentation": "Membership test operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\nThe operators \"in\" and \"not in\" test for membership.\u00a0\u00a0\"x in s\"\nevaluates to \"True\" if \\*x\\* is a member of \\*s\\*, and \"False\" otherwise.\n\"x not in s\" returns the negation of \"x in s\".\u00a0\u00a0All built-in sequences\nand set types support this as well as dictionary, for which \"in\" tests\nwhether the dictionary has a given key. For container types such as\nlist, tuple, set, frozenset, dict, or collections.deque, the\nexpression \"x in y\" is equivalent to \"any(x is e or x == e for e in\ny)\".\n\nFor the string and bytes types, \"x in y\" is \"True\" if and only if \\*x\\*\nis a substring of \\*y\\*.\u00a0\u00a0An equivalent test is \"y.find(x) != -1\".\nEmpty strings are always considered to be a substring of any other\nstring, so \"\"\" in \"abc\"\" will return \"True\".\n\nFor user-defined classes which define the \"__contains__()\" method, \"x\nin y\" returns \"True\" if \"y.__contains__(x)\" returns a true value, and\n\"False\" otherwise.\n\nFor user-defined classes which do not define \"__contains__()\" but do\ndefine \"_'
3.396902 RECV on 1(out): '_iter__()\", \"x in y\" is \"True\" if some value \"z\" with \"x ==\nz\" is produced while iterating over \"y\".\u00a0\u00a0If an exception is raised\nduring the iteration, it is as if \"in\" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n\"__getitem__()\", \"x in y\" is \"True\" if and only if there is a non-\nnegative integer index \\*i\\* such that \"x == y[i]\", and all lower\ninteger indices do not raise \"IndexError\" exception.\u00a0\u00a0(If any other\nexception is raised, it is as if \"in\" raised that exception).\n\nThe operator \"not in\" is defined to have the inverse true value of\n\"in\".", "sortText": "ain", "insertText": "in"}, {"label": "is", "kind": 14, "detail": "", "documentation": "Comparisons\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\nUnlike C, all comparison operations in Python have the same priority,\nwhich is lower than that of any arithmetic, shifting or bitwise\noperation.\u00a0\u00a0Also unlike C, expressions like \"a < b < c\" have the\ninterpretation that is conventional in mathematics:\n\n\u00a0\u00a0 comparison\u00a0\u00a0\u00a0\u00a0::= or_expr ( comp_operator or_expr )\\*\n\u00a0\u00a0 comp_operator ::= \"<\" | \">\" | \"==\" | \">=\" | \"<=\" | \"!=\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | \"is\" [\"not\"] | [\"not\"] \"in\"\n\nComparisons yield boolean values: \"True\" or \"False\".\n\nComparisons can be chained arbitrarily, e.g., \"x < y <= z\" is\nequivalent to \"x < y and y <= z\", except that \"y\" is evaluated only\nonce (but in both cases \"z\" is not evaluated at all when \"x < y\" is\nfound to be false).\n\nFormally, if \\*a\\*, \\*b\\*, \\*c\\*, \u2026, \\*y\\*, \\*z\\* are expressions and \\*op1\\*,\n\\*op2\\*, \u2026, \\*opN\\* are comparison operators, then \"a op1 b op2 c ... y\nopN z\" is equivalent to \"a op1 b and b op2 c and ... y opN z\", except\nthat each expression is evaluated at most once.\n\nNote that \"a op1 b op2 c\" doesn\u2019t imply any kind of comparison between\n\\*a\\* and \\*c\\*, so that, e.g., \"x < y > z\" is perfectly legal (though\nperhaps not pretty).\n\n\nValue comparisons\n=================\n\nThe operators \"<\", \">\", \"==\", \">=\", \"<=\", and \"!=\" compare the values\nof two objects.\u00a0\u00a0The objects do not need to have the same type.\n\nChapter Objects, values and types states that objects have a value (in\naddition to type and identity).\u00a0\u00a0The value of an object is a rather\nabstract notion in Python: For example, there is no canonical access\nmethod for an object\u2019s value.\u00a0\u00a0Also, there is no requirement that the\nvalue of an object should be constructed in a particular way, e.g.\ncomprised of all its data attributes. Comparison operators implement a\nparticular notion of what the value of an object is.\u00a0\u00a0One can think of\nthem as defining the value of an object indirectly, by means of their\ncomparison implementation.\n\nBecause all types are (direct or indirect) subtypes of \"object\", they\ninherit the default comparison behavior from \"object\".\u00a0\u00a0Types can\ncustomize their comparison behavior by implementing \\*rich comparison\nmethods\\* like \"__lt__()\", described in Basic customization.\n\nThe default behavior for equality comparison (\"==\" and \"!=\") is based\non the identity of the objects.\u00a0\u00a0Hence, equality comparison of\ninstances with the same identity results in equality, and equality\ncomparison of instances with different identities results in\ninequality.\u00a0\u00a0A motivation for this default behavior is the desire that\nall objects should be reflexive (i.e. \"x is y\" implies \"x == y\").\n\nA default order comparison (\"<\", \">\", \"<=\", and \">=\") is not provided;\nan attempt raises \"TypeError\".\u00a0\u00a0A motivation for this default behavior\nis the lack of a similar invariant as for equality.\n\nThe behavior of the default equality comparison, that instances with\ndifferent identities are always unequal, may be in contr'
3.396924 RECV on 1(out): 'ast to what\ntypes will need that have a sensible definition of object value and\nvalue-based equality.\u00a0\u00a0Such types will need to customize their\ncomparison behavior, and in fact, a number of built-in types have done\nthat.\n\nThe following list describes the comparison behavior of the most\nimportant built-in types.\n\n\\* Numbers of built-in numeric types (Numeric Types \u2014 int, float,\n\u00a0\u00a0complex) and of the standard library types \"fractions.Fraction\" and\n\u00a0\u00a0\"decimal.Decimal\" can be compared within and across their types,\n\u00a0\u00a0with the restriction that complex numbers do not support order\n\u00a0\u00a0comparison.\u00a0\u00a0Within the limits of the types involved, they compare\n\u00a0\u00a0mathematically (algorithmically) correct without loss of precision.\n\n\u00a0\u00a0The not-a-number values \"float('NaN')\" and \"Decimal('NaN')\" are\n\u00a0\u00a0special.\u00a0\u00a0They are identical to themselves (\"x is x\" is true) but\n\u00a0\u00a0are not equal to themselves (\"x == x\" is false).\u00a0\u00a0Additionally,\n\u00a0\u00a0comparing any number to a not-a-number value will return \"False\".\n\u00a0\u00a0For example, both \"3 < float('NaN')\" and \"float('NaN') < 3\" will\n\u00a0\u00a0return \"False\".\n\n\\* Binary sequences (instances of \"bytes\" or \"bytearray\") can be\n\u00a0\u00a0compared within and across their types.\u00a0\u00a0They compare\n\u00a0\u00a0lexicographically using the numeric values of their elements.\n\n\\* Strings (instances of \"str\") compare lexicographically using the\n\u00a0\u00a0numerical Unicode code points (the result of the built-in function\n\u00a0\u00a0\"ord()\") of their characters. [3]\n\n\u00a0\u00a0Strings and binary sequences cannot be directly compared.\n\n\\* Sequences (instances of \"tuple\", \"list\", or \"range\") can be\n\u00a0\u00a0compared only within each of their types, with the restriction that\n\u00a0\u00a0ranges do not support order comparison.\u00a0\u00a0Equality comparison across\n\u00a0\u00a0these types results in inequality, and ordering comparison across\n\u00a0\u00a0these types raises \"TypeError\".\n\n\u00a0\u00a0Sequences compare lexicographically using comparison of\n\u00a0\u00a0corresponding elements, whereby reflexivity of the elements is\n\u00a0\u00a0enforced.\n\n\u00a0\u00a0In enforcing reflexivity of elements, the comparison of collections\n\u00a0\u00a0assumes that for a collection element \"x\", \"x == x\" is always true.\n\u00a0\u00a0Based on that assumption, element identity is compared first, and\n\u00a0\u00a0element comparison is performed only for distinct elements.\u00a0\u00a0This\n\u00a0\u00a0approach yields the same result as a strict element comparison\n\u00a0\u00a0would, if the compared elements are reflexive.\u00a0\u00a0For non-reflexive\n\u00a0\u00a0elements, the result is different than for strict element\n\u00a0\u00a0comparison, and may be surprising:\u00a0\u00a0The non-reflexive not-a-number\n\u00a0\u00a0values for example result in the following comparison behavior when\n\u00a0\u00a0used in a list:\n\n\u00a0\u00a0\u00a0\u00a0 >>> nan = float('NaN')\n\u00a0\u00a0\u00a0\u00a0 >>> nan is nan\n\u00a0\u00a0\u00a0\u00a0 True\n\u00a0\u00a0\u00a0\u00a0 >>> nan == nan\n\u00a0\u00a0\u00a0\u00a0 False\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <-- the defined non-reflexive behavior of NaN\n\u00a0\u00a0\u00a0\u00a0 >>> [nan] == [nan]\n\u00a0\u00a0\u00a0\u00a0 True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<-- list enforces reflexivity and tests identity first\n\n\u00a0\u00a0Lexicographical comparison between built-in collections works as\n\u00a0\u00a0follows:\n\n\u00a0\u00a0\\* For two collections to compare equal, they must be of the same\n\u00a0\u00a0\u00a0\u00a0type, have the same length, and each pair of corresponding\n\u00a0\u00a0\u00a0\u00a0elements must compare equal (for example, \"[1,2] == (1,2)\" is\n\u00a0\u00a0\u00a0\u00a0false because the type is not the same).\n\n\u00a0\u0'
3.396941 RECV on 1(out): '0a0\\* Collections that support order comparison are ordered the same\n\u00a0\u00a0\u00a0\u00a0as their first unequal elements (for example, \"[1,2,x] <= [1,2,y]\"\n\u00a0\u00a0\u00a0\u00a0has the same value as \"x <= y\").\u00a0\u00a0If a corresponding element does\n\u00a0\u00a0\u00a0\u00a0not exist, the shorter collection is ordered first (for example,\n\u00a0\u00a0\u00a0\u00a0\"[1,2] < [1,2,3]\" is true).\n\n\\* Mappings (instances of \"dict\") compare equal if and only if they\n\u00a0\u00a0have equal \\*(key, value)\\* pairs. Equality comparison of the keys and\n\u00a0\u00a0values enforces reflexivity.\n\n\u00a0\u00a0Order comparisons (\"<\", \">\", \"<=\", and \">=\") raise \"TypeError\".\n\n\\* Sets (instances of \"set\" or \"frozenset\") can be compared within\n\u00a0\u00a0and across their types.\n\n\u00a0\u00a0They define order comparison operators to mean subset and superset\n\u00a0\u00a0tests.\u00a0\u00a0Those relations do not define total orderings (for example,\n\u00a0\u00a0the two sets \"{1,2}\" and \"{2,3}\" are not equal, nor subsets of one\n\u00a0\u00a0another, nor supersets of one another).\u00a0\u00a0Accordingly, sets are not\n\u00a0\u00a0appropriate arguments for functions which depend on total ordering\n\u00a0\u00a0(for example, \"min()\", \"max()\", and \"sorted()\" produce undefined\n\u00a0\u00a0results given a list of sets as inputs).\n\n\u00a0\u00a0Comparison of sets enforces reflexivity of its elements.\n\n\\* Most other built-in types have no comparison methods implemented,\n\u00a0\u00a0so they inherit the default comparison behavior.\n\nUser-defined classes that customize their comparison behavior should\nfollow some consistency rules, if possible:\n\n\\* Equality comparison should be reflexive. In other words, identical\n\u00a0\u00a0objects should compare equal:\n\n\u00a0\u00a0\u00a0\u00a0 \"x is y\" implies \"x == y\"\n\n\\* Comparison should be symmetric. In other words, the following\n\u00a0\u00a0expressions should have the same result:\n\n\u00a0\u00a0\u00a0\u00a0 \"x == y\" and \"y == x\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x != y\" and \"y != x\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x < y\" and \"y > x\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x <= y\" and \"y >= x\"\n\n\\* Comparison should be transitive. The following (non-exhaustive)\n\u00a0\u00a0examples illustrate that:\n\n\u00a0\u00a0\u00a0\u00a0 \"x > y and y > z\" implies \"x > z\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x < y and y <= z\" implies \"x < z\"\n\n\\* Inverse comparison should result in the boolean negation. In other\n\u00a0\u00a0words, the following expressions should have the same result:\n\n\u00a0\u00a0\u00a0\u00a0 \"x == y\" and \"not x != y\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x < y\" and \"not x >= y\" (for total ordering)\n\n\u00a0\u00a0\u00a0\u00a0 \"x > y\" and \"not x <= y\" (for total ordering)\n\n\u00a0\u00a0The last two expressions apply to totally ordered collections (e.g.\n\u00a0\u00a0to sequences, but not to sets or mappings). See also the\n\u00a0\u00a0\"total_ordering()\" decorator.\n\n\\* The \"hash()\" result should be consistent with equality. Objects\n\u00a0\u00a0that are equal should either have the same hash value, or be marked\n\u00a0\u00a0as unhashable.\n\nPython does not enforce these consistency rules. In fact, the\nnot-a-number values are an example for not following these rules.\n\n\nMembership test operations\n==========================\n\nThe operators \"in\" and \"not in\" test for membership.\u00a0\u00a0\"x in s\"\nevaluates to \"True\" if \\*x\\* is a member of \\*s\\*, and \"False\" otherwise.\n\"x not in s\" returns the negation of \"x in s\".\u00a0\u00a0All built-in sequences\nand set types support this as well as dictionary, for which \"in\" tests\nwhether the dictionary has a given key. For container types such as\nlist, tuple, set, frozenset, dict, or collections.deque, the\nexpression \"x in y\" is equivalent to \"any(x is e or x == e for e in\ny)\".\n\nFor the string and bytes types, \"x in y\" is \"True\" if and only if \\*x\\*\nis a substring of \\*y\\*.\u00a0\u00a0An equivalent test is \"y.find(x) != -1\".\nEmp'
3.396958 RECV on 1(out): 'ty strings are always considered to be a substring of any other\nstring, so \"\"\" in \"abc\"\" will return \"True\".\n\nFor user-defined classes which define the \"__contains__()\" method, \"x\nin y\" returns \"True\" if \"y.__contains__(x)\" returns a true value, and\n\"False\" otherwise.\n\nFor user-defined classes which do not define \"__contains__()\" but do\ndefine \"__iter__()\", \"x in y\" is \"True\" if some value \"z\" with \"x ==\nz\" is produced while iterating over \"y\".\u00a0\u00a0If an exception is raised\nduring the iteration, it is as if \"in\" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n\"__getitem__()\", \"x in y\" is \"True\" if and only if there is a non-\nnegative integer index \\*i\\* such that \"x == y[i]\", and all lower\ninteger indices do not raise \"IndexError\" exception.\u00a0\u00a0(If any other\nexception is raised, it is as if \"in\" raised that exception).\n\nThe operator \"not in\" is defined to have the inverse true value of\n\"in\".\n\n\nIdentity comparisons\n====================\n\nThe operators \"is\" and \"is not\" test for object identity: \"x is y\" is\ntrue if and only if \\*x\\* and \\*y\\* are the same object.\u00a0\u00a0Object identity\nis determined using the \"id()\" function.\u00a0\u00a0\"x is not y\" yields the\ninverse truth value. [4]", "sortText": "ais", "insertText": "is"}, {"label": "not", "kind": 14, "detail": "", "documentation": "Boolean operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\n\u00a0\u00a0 or_test\u00a0\u00a0::= and_test | or_test \"or\" and_test\n\u00a0\u00a0 and_test ::= not_test | and_test \"and\" not_test\n\u00a0\u00a0 not_test ::= comparison | \"not\" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: \"False\", \"None\", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).\u00a0\u00a0All other values are interpreted\nas true.\u00a0\u00a0User-defined objects can customize their truth value by\nproviding a \"__bool__()\" method.\n\nThe operator \"not\" yields \"True\" if its argument is false, \"False\"\notherwise.\n\nThe expression \"x and y\" first evaluates \\*x\\*; if \\*x\\* is false, its\nvalue is returned; otherwise, \\*y\\* is evaluated and the resulting value\nis returned.\n\nThe expression \"x or y\" first evaluates \\*x\\*; if \\*x\\* is true, its value\nis returned; otherwise, \\*y\\* is evaluated and the resulting value is\nreturned.\n\n(Note that neither \"and\" nor \"or\" restrict the value and type they\nreturn to \"False\" and \"True\", but rather return the last evaluated\nargument.\u00a0\u00a0This is sometimes useful, e.g., if \"s\" is a string that\nshould be replaced by a default value if it is empty, the expression\n\"s or 'foo'\" yields the desired value.\u00a0\u00a0Because \"not\" has to create a\nnew value, it returns a boolean value regardless of the type of its\nargument (for example, \"not 'foo'\" produces \"False\" rather than \"''\".)", "sortText": "anot", "insertText": "not"}, {"label": "or", "kind": 14, "detail": "", "documentation": "Boolean operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\n\u00a0\u00a0 or_test\u00a0\u00a0::= and_test | or_test \"or\" and_test\n\u00a0\u00a0 and_test ::= not_test | and_test \"and\" not_test\n\u00a0\u00a0 not_test ::= comparison | \"not\" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: \"False\", \"None\", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).\u00a0\u00a0All other values are interpreted\nas true.\u00a0\u00a0User-defined objects can customize their truth value by\nproviding a \"__bool__()\" method.\n\nThe operator \"not\" yields \"True\" if its argument is false, \"False\"\notherwise.\n\nThe expression \'
3.396974 RECV on 1(out): '"x and y\" first evaluates \\*x\\*; if \\*x\\* is false, its\nvalue is returned; otherwise, \\*y\\* is evaluated and the resulting value\nis returned.\n\nThe expression \"x or y\" first evaluates \\*x\\*; if \\*x\\* is true, its value\nis returned; otherwise, \\*y\\* is evaluated and the resulting value is\nreturned.\n\n(Note that neither \"and\" nor \"or\" restrict the value and type they\nreturn to \"False\" and \"True\", but rather return the last evaluated\nargument.\u00a0\u00a0This is sometimes useful, e.g., if \"s\" is a string that\nshould be replaced by a default value if it is empty, the expression\n\"s or 'foo'\" yields the desired value.\u00a0\u00a0Because \"not\" has to create a\nnew value, it returns a boolean value regardless of the type of its\nargument (for example, \"not 'foo'\" produces \"False\" rather than \"''\".)", "sortText": "aor", "insertText": "or"}]}}'
3.396976 : looking for messages on channels
3.397014 on 1: Invoking channel callback <SNR>62_VimOutputCallback
3.397703 : looking for messages on channels
3.506311 SEND on 1(in): 'Content-Length: 226
{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"HELLO = 'hello'\n\n\ndef main():\n print(HE)\n"}],"textDocument":{"uri":"file:///Users/shawn/src/python/examples/ale.py","version":3}}}'
3.506668 SEND on 1(in): 'Content-Length: 179
{"method":"textDocument/completion","jsonrpc":"2.0","id":3,"params":{"textDocument":{"uri":"file:///Users/shawn/src/python/examples/ale.py"},"position":{"character":13,"line":4}}}'
3.509572 RECV on 1(out): 'Content-Length: 21289
Content-Type: application/vscode-jsonrpc; charset=utf8
{"jsonrpc": "2.0", "id": 3, "result": {"isIncomplete": false, "items": [{"label": "and", "kind": 14, "detail": "", "documentation": "Boolean operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\n\u00a0\u00a0 or_test\u00a0\u00a0::= and_test | or_test \"or\" and_test\n\u00a0\u00a0 and_test ::= not_test | and_test \"and\" not_test\n\u00a0\u00a0 not_test ::= comparison | \"not\" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: \"False\", \"None\", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).\u00a0\u00a0All other values are interpreted\nas true.\u00a0\u00a0User-defined objects can customize their truth value by\nproviding a \"__bool__()\" method.\n\nThe operator \"not\" yields \"True\" if its argument is false, \"False\"\notherwise.\n\nThe expression \"x and y\" first evaluates \\*x\\*; if \\*x\\* is false, its\nvalue is returned; otherwise, \\*y\\* is evaluated and the resulting value\nis returned.\n\nThe expression \"x or y\" first evaluates \\*x\\*; if \\*x\\* is true, its value\nis returned; otherwise, \\*y\\* is evaluated and the resulting value is\nreturned.\n\n(Note that neither \"and\" nor \"or\" restrict the value and type they\nreturn to \"False\" and \"True\", but rather return the last evaluated\nargument.\u00a0\u00a0This is sometimes useful, e.g., if \"s\" is a string that\nshould be replaced by a default value if it is empty, the expression\n\"s or 'foo'\" yields the desired value.\u00a0\u00a0Because \"not\" has to create a\nnew value, it returns a boolean value regardless of the type of its\nargument (for example, \"not 'foo'\" produces \"False\" rather than \"''\".)", "sortText": "aand", "insertText": "and"}, {"label": "if", "kind": 14, "detail": "", "documentation": "The \"if\" statement\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\nThe \"if\" statement is used for conditional execution:\n\n\u00a0\u00a0 if_stmt ::= \"if\" expression \":\" suite\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ( \"elif\" expression \":\" suite )\\*\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [\"else\" \":\" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section Boolean operations\nfor the definition of true and false); then that suite is executed\n(and no other part of the \"if\" statement is executed or evaluated).\nIf all expressions are false, the suite of the \"else\" clause, if\npresent, is executed.", "sortText": "aif", "insertText": "if"}, {"label": "in", "kind": 14, "detail": "", "documentation": "Membership test operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\nThe operators \"in\" and \"not in\" test for membership.\u00a0\u00a0\"x in s\"\nevaluates to \"True\" if \\*x\\* is a member of \\*s\\*, and \"False\" otherwise.\n\"x not in s\" returns the negation of \"x in s\".\u00a0\u00a0All built-in sequences\nand set types support this as well as dictionary, for which \"in\" tests\nwhether the dictionary has a given key. For container types such as\nlist, tuple, set, frozenset, dict, or collections.deque, the\nexpression \"x in y\" is equivalent to \"any(x is e or x == e for e in\ny)\".\n\nFor the string and bytes types, \"x in y\" is \"True\" if and only if \\*x\\*\nis a substring of \\*y\\*.\u00a0\u00a0An equivalent test is \"y.find(x) != -1\".\nEmpty strings are always considered to be a substring of any other\nstring, so \"\"\" in \"abc\"\" will return \"True\".\n\nFor user-defined classes which define the \"__contains__()\" method, \"x\nin y\" returns \"True\" if \"y.__contains__(x)\" returns a true value, and\n\"False\" otherwise.\n\nFor user-defined classes which do not define \"__contains__()\" but do\ndefine \"_'
3.509608 RECV on 1(out): '_iter__()\", \"x in y\" is \"True\" if some value \"z\" with \"x ==\nz\" is produced while iterating over \"y\".\u00a0\u00a0If an exception is raised\nduring the iteration, it is as if \"in\" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n\"__getitem__()\", \"x in y\" is \"True\" if and only if there is a non-\nnegative integer index \\*i\\* such that \"x == y[i]\", and all lower\ninteger indices do not raise \"IndexError\" exception.\u00a0\u00a0(If any other\nexception is raised, it is as if \"in\" raised that exception).\n\nThe operator \"not in\" is defined to have the inverse true value of\n\"in\".", "sortText": "ain", "insertText": "in"}, {"label": "is", "kind": 14, "detail": "", "documentation": "Comparisons\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\nUnlike C, all comparison operations in Python have the same priority,\nwhich is lower than that of any arithmetic, shifting or bitwise\noperation.\u00a0\u00a0Also unlike C, expressions like \"a < b < c\" have the\ninterpretation that is conventional in mathematics:\n\n\u00a0\u00a0 comparison\u00a0\u00a0\u00a0\u00a0::= or_expr ( comp_operator or_expr )\\*\n\u00a0\u00a0 comp_operator ::= \"<\" | \">\" | \"==\" | \">=\" | \"<=\" | \"!=\"\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | \"is\" [\"not\"] | [\"not\"] \"in\"\n\nComparisons yield boolean values: \"True\" or \"False\".\n\nComparisons can be chained arbitrarily, e.g., \"x < y <= z\" is\nequivalent to \"x < y and y <= z\", except that \"y\" is evaluated only\nonce (but in both cases \"z\" is not evaluated at all when \"x < y\" is\nfound to be false).\n\nFormally, if \\*a\\*, \\*b\\*, \\*c\\*, \u2026, \\*y\\*, \\*z\\* are expressions and \\*op1\\*,\n\\*op2\\*, \u2026, \\*opN\\* are comparison operators, then \"a op1 b op2 c ... y\nopN z\" is equivalent to \"a op1 b and b op2 c and ... y opN z\", except\nthat each expression is evaluated at most once.\n\nNote that \"a op1 b op2 c\" doesn\u2019t imply any kind of comparison between\n\\*a\\* and \\*c\\*, so that, e.g., \"x < y > z\" is perfectly legal (though\nperhaps not pretty).\n\n\nValue comparisons\n=================\n\nThe operators \"<\", \">\", \"==\", \">=\", \"<=\", and \"!=\" compare the values\nof two objects.\u00a0\u00a0The objects do not need to have the same type.\n\nChapter Objects, values and types states that objects have a value (in\naddition to type and identity).\u00a0\u00a0The value of an object is a rather\nabstract notion in Python: For example, there is no canonical access\nmethod for an object\u2019s value.\u00a0\u00a0Also, there is no requirement that the\nvalue of an object should be constructed in a particular way, e.g.\ncomprised of all its data attributes. Comparison operators implement a\nparticular notion of what the value of an object is.\u00a0\u00a0One can think of\nthem as defining the value of an object indirectly, by means of their\ncomparison implementation.\n\nBecause all types are (direct or indirect) subtypes of \"object\", they\ninherit the default comparison behavior from \"object\".\u00a0\u00a0Types can\ncustomize their comparison behavior by implementing \\*rich comparison\nmethods\\* like \"__lt__()\", described in Basic customization.\n\nThe default behavior for equality comparison (\"==\" and \"!=\") is based\non the identity of the objects.\u00a0\u00a0Hence, equality comparison of\ninstances with the same identity results in equality, and equality\ncomparison of instances with different identities results in\ninequality.\u00a0\u00a0A motivation for this default behavior is the desire that\nall objects should be reflexive (i.e. \"x is y\" implies \"x == y\").\n\nA default order comparison (\"<\", \">\", \"<=\", and \">=\") is not provided;\nan attempt raises \"TypeError\".\u00a0\u00a0A motivation for this default behavior\nis the lack of a similar invariant as for equality.\n\nThe behavior of the default equality comparison, that instances with\ndifferent identities are always unequal, may be in contr'
3.509625 RECV on 1(out): 'ast to what\ntypes will need that have a sensible definition of object value and\nvalue-based equality.\u00a0\u00a0Such types will need to customize their\ncomparison behavior, and in fact, a number of built-in types have done\nthat.\n\nThe following list describes the comparison behavior of the most\nimportant built-in types.\n\n\\* Numbers of built-in numeric types (Numeric Types \u2014 int, float,\n\u00a0\u00a0complex) and of the standard library types \"fractions.Fraction\" and\n\u00a0\u00a0\"decimal.Decimal\" can be compared within and across their types,\n\u00a0\u00a0with the restriction that complex numbers do not support order\n\u00a0\u00a0comparison.\u00a0\u00a0Within the limits of the types involved, they compare\n\u00a0\u00a0mathematically (algorithmically) correct without loss of precision.\n\n\u00a0\u00a0The not-a-number values \"float('NaN')\" and \"Decimal('NaN')\" are\n\u00a0\u00a0special.\u00a0\u00a0They are identical to themselves (\"x is x\" is true) but\n\u00a0\u00a0are not equal to themselves (\"x == x\" is false).\u00a0\u00a0Additionally,\n\u00a0\u00a0comparing any number to a not-a-number value will return \"False\".\n\u00a0\u00a0For example, both \"3 < float('NaN')\" and \"float('NaN') < 3\" will\n\u00a0\u00a0return \"False\".\n\n\\* Binary sequences (instances of \"bytes\" or \"bytearray\") can be\n\u00a0\u00a0compared within and across their types.\u00a0\u00a0They compare\n\u00a0\u00a0lexicographically using the numeric values of their elements.\n\n\\* Strings (instances of \"str\") compare lexicographically using the\n\u00a0\u00a0numerical Unicode code points (the result of the built-in function\n\u00a0\u00a0\"ord()\") of their characters. [3]\n\n\u00a0\u00a0Strings and binary sequences cannot be directly compared.\n\n\\* Sequences (instances of \"tuple\", \"list\", or \"range\") can be\n\u00a0\u00a0compared only within each of their types, with the restriction that\n\u00a0\u00a0ranges do not support order comparison.\u00a0\u00a0Equality comparison across\n\u00a0\u00a0these types results in inequality, and ordering comparison across\n\u00a0\u00a0these types raises \"TypeError\".\n\n\u00a0\u00a0Sequences compare lexicographically using comparison of\n\u00a0\u00a0corresponding elements, whereby reflexivity of the elements is\n\u00a0\u00a0enforced.\n\n\u00a0\u00a0In enforcing reflexivity of elements, the comparison of collections\n\u00a0\u00a0assumes that for a collection element \"x\", \"x == x\" is always true.\n\u00a0\u00a0Based on that assumption, element identity is compared first, and\n\u00a0\u00a0element comparison is performed only for distinct elements.\u00a0\u00a0This\n\u00a0\u00a0approach yields the same result as a strict element comparison\n\u00a0\u00a0would, if the compared elements are reflexive.\u00a0\u00a0For non-reflexive\n\u00a0\u00a0elements, the result is different than for strict element\n\u00a0\u00a0comparison, and may be surprising:\u00a0\u00a0The non-reflexive not-a-number\n\u00a0\u00a0values for example result in the following comparison behavior when\n\u00a0\u00a0used in a list:\n\n\u00a0\u00a0\u00a0\u00a0 >>> nan = float('NaN')\n\u00a0\u00a0\u00a0\u00a0 >>> nan is nan\n\u00a0\u00a0\u00a0\u00a0 True\n\u00a0\u00a0\u00a0\u00a0 >>> nan == nan\n\u00a0\u00a0\u00a0\u00a0 False\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <-- the defined non-reflexive behavior of NaN\n\u00a0\u00a0\u00a0\u00a0 >>> [nan] == [nan]\n\u00a0\u00a0\u00a0\u00a0 True\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<-- list enforces reflexivity and tests identity first\n\n\u00a0\u00a0Lexicographical comparison between built-in collections works as\n\u00a0\u00a0follows:\n\n\u00a0\u00a0\\* For two collections to compare equal, they must be of the same\n\u00a0\u00a0\u00a0\u00a0type, have the same length, and each pair of corresponding\n\u00a0\u00a0\u00a0\u00a0elements must compare equal (for example, \"[1,2] == (1,2)\" is\n\u00a0\u00a0\u00a0\u00a0false because the type is not the same).\n\n\u00a0\u0'
3.509640 RECV on 1(out): '0a0\\* Collections that support order comparison are ordered the same\n\u00a0\u00a0\u00a0\u00a0as their first unequal elements (for example, \"[1,2,x] <= [1,2,y]\"\n\u00a0\u00a0\u00a0\u00a0has the same value as \"x <= y\").\u00a0\u00a0If a corresponding element does\n\u00a0\u00a0\u00a0\u00a0not exist, the shorter collection is ordered first (for example,\n\u00a0\u00a0\u00a0\u00a0\"[1,2] < [1,2,3]\" is true).\n\n\\* Mappings (instances of \"dict\") compare equal if and only if they\n\u00a0\u00a0have equal \\*(key, value)\\* pairs. Equality comparison of the keys and\n\u00a0\u00a0values enforces reflexivity.\n\n\u00a0\u00a0Order comparisons (\"<\", \">\", \"<=\", and \">=\") raise \"TypeError\".\n\n\\* Sets (instances of \"set\" or \"frozenset\") can be compared within\n\u00a0\u00a0and across their types.\n\n\u00a0\u00a0They define order comparison operators to mean subset and superset\n\u00a0\u00a0tests.\u00a0\u00a0Those relations do not define total orderings (for example,\n\u00a0\u00a0the two sets \"{1,2}\" and \"{2,3}\" are not equal, nor subsets of one\n\u00a0\u00a0another, nor supersets of one another).\u00a0\u00a0Accordingly, sets are not\n\u00a0\u00a0appropriate arguments for functions which depend on total ordering\n\u00a0\u00a0(for example, \"min()\", \"max()\", and \"sorted()\" produce undefined\n\u00a0\u00a0results given a list of sets as inputs).\n\n\u00a0\u00a0Comparison of sets enforces reflexivity of its elements.\n\n\\* Most other built-in types have no comparison methods implemented,\n\u00a0\u00a0so they inherit the default comparison behavior.\n\nUser-defined classes that customize their comparison behavior should\nfollow some consistency rules, if possible:\n\n\\* Equality comparison should be reflexive. In other words, identical\n\u00a0\u00a0objects should compare equal:\n\n\u00a0\u00a0\u00a0\u00a0 \"x is y\" implies \"x == y\"\n\n\\* Comparison should be symmetric. In other words, the following\n\u00a0\u00a0expressions should have the same result:\n\n\u00a0\u00a0\u00a0\u00a0 \"x == y\" and \"y == x\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x != y\" and \"y != x\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x < y\" and \"y > x\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x <= y\" and \"y >= x\"\n\n\\* Comparison should be transitive. The following (non-exhaustive)\n\u00a0\u00a0examples illustrate that:\n\n\u00a0\u00a0\u00a0\u00a0 \"x > y and y > z\" implies \"x > z\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x < y and y <= z\" implies \"x < z\"\n\n\\* Inverse comparison should result in the boolean negation. In other\n\u00a0\u00a0words, the following expressions should have the same result:\n\n\u00a0\u00a0\u00a0\u00a0 \"x == y\" and \"not x != y\"\n\n\u00a0\u00a0\u00a0\u00a0 \"x < y\" and \"not x >= y\" (for total ordering)\n\n\u00a0\u00a0\u00a0\u00a0 \"x > y\" and \"not x <= y\" (for total ordering)\n\n\u00a0\u00a0The last two expressions apply to totally ordered collections (e.g.\n\u00a0\u00a0to sequences, but not to sets or mappings). See also the\n\u00a0\u00a0\"total_ordering()\" decorator.\n\n\\* The \"hash()\" result should be consistent with equality. Objects\n\u00a0\u00a0that are equal should either have the same hash value, or be marked\n\u00a0\u00a0as unhashable.\n\nPython does not enforce these consistency rules. In fact, the\nnot-a-number values are an example for not following these rules.\n\n\nMembership test operations\n==========================\n\nThe operators \"in\" and \"not in\" test for membership.\u00a0\u00a0\"x in s\"\nevaluates to \"True\" if \\*x\\* is a member of \\*s\\*, and \"False\" otherwise.\n\"x not in s\" returns the negation of \"x in s\".\u00a0\u00a0All built-in sequences\nand set types support this as well as dictionary, for which \"in\" tests\nwhether the dictionary has a given key. For container types such as\nlist, tuple, set, frozenset, dict, or collections.deque, the\nexpression \"x in y\" is equivalent to \"any(x is e or x == e for e in\ny)\".\n\nFor the string and bytes types, \"x in y\" is \"True\" if and only if \\*x\\*\nis a substring of \\*y\\*.\u00a0\u00a0An equivalent test is \"y.find(x) != -1\".\nEmp'
3.509656 RECV on 1(out): 'ty strings are always considered to be a substring of any other\nstring, so \"\"\" in \"abc\"\" will return \"True\".\n\nFor user-defined classes which define the \"__contains__()\" method, \"x\nin y\" returns \"True\" if \"y.__contains__(x)\" returns a true value, and\n\"False\" otherwise.\n\nFor user-defined classes which do not define \"__contains__()\" but do\ndefine \"__iter__()\", \"x in y\" is \"True\" if some value \"z\" with \"x ==\nz\" is produced while iterating over \"y\".\u00a0\u00a0If an exception is raised\nduring the iteration, it is as if \"in\" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n\"__getitem__()\", \"x in y\" is \"True\" if and only if there is a non-\nnegative integer index \\*i\\* such that \"x == y[i]\", and all lower\ninteger indices do not raise \"IndexError\" exception.\u00a0\u00a0(If any other\nexception is raised, it is as if \"in\" raised that exception).\n\nThe operator \"not in\" is defined to have the inverse true value of\n\"in\".\n\n\nIdentity comparisons\n====================\n\nThe operators \"is\" and \"is not\" test for object identity: \"x is y\" is\ntrue if and only if \\*x\\* and \\*y\\* are the same object.\u00a0\u00a0Object identity\nis determined using the \"id()\" function.\u00a0\u00a0\"x is not y\" yields the\ninverse truth value. [4]", "sortText": "ais", "insertText": "is"}, {"label": "not", "kind": 14, "detail": "", "documentation": "Boolean operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\n\u00a0\u00a0 or_test\u00a0\u00a0::= and_test | or_test \"or\" and_test\n\u00a0\u00a0 and_test ::= not_test | and_test \"and\" not_test\n\u00a0\u00a0 not_test ::= comparison | \"not\" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: \"False\", \"None\", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).\u00a0\u00a0All other values are interpreted\nas true.\u00a0\u00a0User-defined objects can customize their truth value by\nproviding a \"__bool__()\" method.\n\nThe operator \"not\" yields \"True\" if its argument is false, \"False\"\notherwise.\n\nThe expression \"x and y\" first evaluates \\*x\\*; if \\*x\\* is false, its\nvalue is returned; otherwise, \\*y\\* is evaluated and the resulting value\nis returned.\n\nThe expression \"x or y\" first evaluates \\*x\\*; if \\*x\\* is true, its value\nis returned; otherwise, \\*y\\* is evaluated and the resulting value is\nreturned.\n\n(Note that neither \"and\" nor \"or\" restrict the value and type they\nreturn to \"False\" and \"True\", but rather return the last evaluated\nargument.\u00a0\u00a0This is sometimes useful, e.g., if \"s\" is a string that\nshould be replaced by a default value if it is empty, the expression\n\"s or 'foo'\" yields the desired value.\u00a0\u00a0Because \"not\" has to create a\nnew value, it returns a boolean value regardless of the type of its\nargument (for example, \"not 'foo'\" produces \"False\" rather than \"''\".)", "sortText": "anot", "insertText": "not"}, {"label": "or", "kind": 14, "detail": "", "documentation": "Boolean operations\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\n\n\u00a0\u00a0 or_test\u00a0\u00a0::= and_test | or_test \"or\" and_test\n\u00a0\u00a0 and_test ::= not_test | and_test \"and\" not_test\n\u00a0\u00a0 not_test ::= comparison | \"not\" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: \"False\", \"None\", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).\u00a0\u00a0All other values are interpreted\nas true.\u00a0\u00a0User-defined objects can customize their truth value by\nproviding a \"__bool__()\" method.\n\nThe operator \"not\" yields \"True\" if its argument is false, \"False\"\notherwise.\n\nThe expression \'
3.509671 RECV on 1(out): '"x and y\" first evaluates \\*x\\*; if \\*x\\* is false, its\nvalue is returned; otherwise, \\*y\\* is evaluated and the resulting value\nis returned.\n\nThe expression \"x or y\" first evaluates \\*x\\*; if \\*x\\* is true, its value\nis returned; otherwise, \\*y\\* is evaluated and the resulting value is\nreturned.\n\n(Note that neither \"and\" nor \"or\" restrict the value and type they\nreturn to \"False\" and \"True\", but rather return the last evaluated\nargument.\u00a0\u00a0This is sometimes useful, e.g., if \"s\" is a string that\nshould be replaced by a default value if it is empty, the expression\n\"s or 'foo'\" yields the desired value.\u00a0\u00a0Because \"not\" has to create a\nnew value, it returns a boolean value regardless of the type of its\nargument (for example, \"not 'foo'\" produces \"False\" rather than \"''\".)", "sortText": "aor", "insertText": "or"}]}}'
3.509673 : looking for messages on channels
3.509697 on 1: Invoking channel callback <SNR>62_VimOutputCallback
3.510336 : looking for messages on channels
4.195043 RECV on 1(out): 'Content-Length: 151
Content-Type: application/vscode-jsonrpc; charset=utf8
{"jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params": {"uri": "file:///Users/shawn/src/python/examples/ale.py", "diagnostics": []}}'
4.195051 on 1: Invoking channel callback <SNR>62_VimOutputCallback
4.557217 : looking for messages on channels
9.570112 : Exiting...
9.576518 on 1: channel_select_check(): Read EOF from ch_part[1], closing
9.576572 on 1: channel_select_check(): Read EOF from ch_part[2], closing
The only thing I think I could try is checking out a similarly structured project with basically the same settings, and try using completion myself from the exact same position in a similar file. Beyond that, I don't know if there's something wrong, or what it might be.
I'm having difficulty reproducing the environment in which LanguageClient-neovim
produced completions where ALE
did not. When I try now with the various versions of python-language-server
and the current release of ALE and LanguageClient-neovim
I see identical behavior between the two language clients, i.e., no completions between delimiters. VSCode does provide completions, but it uses a different Python language server and falls back to jedi for completions, so is not really comparable.
I will see if I can't manually run the python language servers and talk to them directly.
It seems that language server completions are not suggested for snippets inside paired delimiters. This makes it difficult to use ALE in conjunction with a delimiter auto-pairing plugin (or when delimiters are manually paired). This does not appear to be a limitation of the language servers, as other LSP clients (e.g., LanguageClient-neovim) can make suggestions inside paired delimiters.
Working examples for golang and python.
Examples of no completion suggestions when typing inside paired function delimeters:
This is with the following ALE config:
Moreover, the minimal RC file used is: