Repository navigation
Conversation
| )) | ||
| }) | ||
| nonfuncts <- ns$nonfuncts[startsWith(ns$nonfuncts, token)] | ||
| nonfuncts <- ns$get_completions(funct_only = FALSE, exported_only = FALSE) |
There was a problem hiding this comment.
funct_only = FALSE sounds like not only functs but also nonfuncts. Does funct = FALSE have clearer meaning?
| } | ||
| } | ||
| } | ||
| completions |
There was a problem hiding this comment.
Another change is that we now generate completions on completion request rather than in the parse callback.
There was a problem hiding this comment.
Because of this, we need to decide how we should delete the document in textDocument/didClose for package projects and non-package projects.
|
|
||
| get_documentation = function(topic) { | ||
| pkgname <- self$package_name | ||
| item <- paste0(c(pkgname, topic), collapse = "::") |
There was a problem hiding this comment.
Here documentation is stored per PackageNamespace rather than previously global documentation, it seems that we no longer have to use item as key, topic itself is good.
| } | ||
| }, | ||
|
|
||
| get_completions = function(want_functs = TRUE, exported_only = TRUE) { |
There was a problem hiding this comment.
Just feel redundant about want_functs since any parameter in any function should mean want something? If you feel okay, never mind :)
There was a problem hiding this comment.
It is because in the code base functs is a vector of the function names and I don’t want to mix them up.
There was a problem hiding this comment.
Another question: I'm a bit confused by the name get_completions because completions means a list of CompletionItems in other contexts. It only returns a character of symbols or names. Does get_symbols have a clearer meaning?
* renkun-ken/handle-untitled-document: Fix handling untitled document * respect textDocument$text first # Conflicts: # R/handlers-textsync.R
|
@renkun-ken Any other comments before we merge it? |
| text_document_did_save <- function(self, params) { | ||
| textDocument <- params$textDocument | ||
| uri <- textDocument$uri | ||
| version <- textDocument$version |
There was a problem hiding this comment.
Is there a reason we drop the document version on didSave?
There was a problem hiding this comment.
DidSaveTextDocumentParams does not contain version.
There was a problem hiding this comment.
Thanks! Just notice that DidOpenTextDocumentParams uses TextDocumentItem where version is defined and DidChangeTextDocumentParams uses VersionedTextDocumentIdentifier where version is defined.
|
LGTM |
|
Let's merge it first. My next task is to improve test coverage #195. |
|
Sorry, it seems we forget to refactor color provider. Let me do a quick fix. |
documentsare now moved insideworkspaceso that they can be easily removed from the workspace.close #147