* feat(commands): better handling of buffer-close
Previously, when closing buffer, you would loose cursor position in other docs.
Also, all splits where the buffer was open would be closed.
This PR changes the behavior, if the view has also other buffer
previously viewed it switches back to the last one instead of the view
being closed. As a side effect, since the views are persisted,
the cursor history is persisted as well.
Fixes: https://github.com/helix-editor/helix/issues/1186
* Adjust buffer close behavior
* Remove closed documents from jump history
* Fix after rebase
* Fix ctrl-u on insert behavior
Now should follow vim behavior more
- no longer remove text on cursor
- no longer remove selected text while inserting
- first kill to start non-whitespace, start, previous new line
* Add comment for c-u parts
Select multiple line and open should be based on the whole selection
and not just the line of the cursor, which causes weird behavior like
opening in the middle of the selection which user might not expect.
* create table of OS and commands in the readme
* add link to wiki from health check (without color; just simple println)
* move the table from readme to docs and add link from the readme to docs
* drop copy on unix,and apply some style fixes from the conversations
* by mistake, I edit master insted of develop
* remove this file from pr
* Update README.md
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* copy table to readme
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
We merge the elements of arrays for the top-level array. For
`languages.toml`, this is the array of languages. For any nested
arrays, we simply take the `right` array as-is instead of using
the union of `left` and `right`.
closes#1000
* log textobject query construction errors
The current behavior is that invalid queries are discarded silently
which makes it difficult to debug invalid textobjects (either invalid
syntax or an update may have come through that changed the valid set
of nodes).
* fix golang textobject query
`method_spec_list` used to be a named node but was removed (I think
for Helix, it was when updated to pull in the support for generics).
Instead of a named node for the list of method specs we have a bunch
of `method_spec` children nodes now. We can match on the set of them
with a `+` wildcard.
Example go for this query:
type Shape interface {
area() float64
perimeter() float64
}
Which is parsed as:
(source_file
(type_declaration
(type_spec
name: (type_identifier)
type: (interface_type
(method_spec
name: (field_identifier)
parameters: (parameter_list)
result: (type_identifier))
(method_spec
name: (field_identifier)
parameters: (parameter_list)
result: (type_identifier))))))
Instead of panicing we can discard the malformed diagnostic. This
`.parse()` fails commonly when a non-conformant language server gives
a diagnostic with a location that breaks the spec:
{ "character": 0, "line": -1 }
can currently be returned by ElixirLS and the python LS. Other
messages in this block are discarded but this one feels special enough
to log.
* added command to extend selection to line above
* fixed view not scrolling up when reaching top of the screen
* refactored shared code into separate impl