<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/plugin/nvim.lua, branch userreg</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>feat(treesitter): add lang parameter to the query editor (#25181)</title>
<updated>2023-09-16T17:05:59+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2023-09-16T17:05:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=28f54a78782318cb9c356a372b9e52a3a6b1f8dd'/>
<id>28f54a78782318cb9c356a372b9e52a3a6b1f8dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(treesitter): rename "preview" =&gt; "edit" #25161</title>
<updated>2023-09-15T10:10:55+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2023-09-15T10:10:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=28233bcb49067aaa70fa6e5fec14e2cc4bcaa315'/>
<id>28233bcb49067aaa70fa6e5fec14e2cc4bcaa315</id>
<content type='text'>
"Edit" more closely describes the generic application than "Preview", though
the buffer contents don't (yet) map to an actual file on disk.

https://github.com/neovim/neovim/pull/24703#discussion_r1321719133</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"Edit" more closely describes the generic application than "Preview", though
the buffer contents don't (yet) map to an actual file on disk.

https://github.com/neovim/neovim/pull/24703#discussion_r1321719133</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter): add a query editor (#24703)</title>
<updated>2023-08-25T18:17:36+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2023-08-25T18:17:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5d8ab32f3871b0232972cac1116ac7cba98389e5'/>
<id>5d8ab32f3871b0232972cac1116ac7cba98389e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(gx): move to to _init_default_mappings #24420</title>
<updated>2023-07-24T15:35:19+00:00</updated>
<author>
<name>marshmallow</name>
<email>marshycity@gmail.com</email>
</author>
<published>2023-07-24T15:35:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6a486c44e66f05ae11137ad7a192b89989192566'/>
<id>6a486c44e66f05ae11137ad7a192b89989192566</id>
<content type='text'>
Problem:
netrw may conflict with the Nvim default "gx" mapping.

Solution:
Initialize keymapping earlier by moving it to vim._init_default_mappings().
That also avoids needing to check maparg().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
netrw may conflict with the Nvim default "gx" mapping.

Solution:
Initialize keymapping earlier by moving it to vim._init_default_mappings().
That also avoids needing to check maparg().</pre>
</div>
</content>
</entry>
<entry>
<title>fix(runtime): don't set gx mapping if already mapped (#24262)</title>
<updated>2023-07-05T08:31:45+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2023-07-05T08:31:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=df297e3c2bd743616371db73467a3f08d2b96d9b'/>
<id>df297e3c2bd743616371db73467a3f08d2b96d9b</id>
<content type='text'>
This matches netrw's use of maparg().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This matches netrw's use of maparg().</pre>
</div>
</content>
</entry>
<entry>
<title>fix(vim.ui.open): return (don't show) error message</title>
<updated>2023-07-04T22:49:10+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2023-07-04T21:33:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e644e7ce0b36dd5e75770f3faa0a84f15e2561e8'/>
<id>e644e7ce0b36dd5e75770f3faa0a84f15e2561e8</id>
<content type='text'>
Problem:
Showing an error via vim.notify() makes it awkward for callers such as
lsp/handlers.lua to avoid showing redundant errors.

Solution:
Return the message instead of showing it. Let the caller decide whether
and when to show the message.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Showing an error via vim.notify() makes it awkward for callers such as
lsp/handlers.lua to avoid showing redundant errors.

Solution:
Return the message instead of showing it. Let the caller decide whether
and when to show the message.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(gx): visual selection, expand env vars</title>
<updated>2023-07-04T21:45:35+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2023-07-02T14:51:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=67b2ed1004ae551c9fe1bbd29a86b5a301570800'/>
<id>67b2ed1004ae551c9fe1bbd29a86b5a301570800</id>
<content type='text'>
---
Rejected experiment: move vim.ui.open() to vim.env.open()

Problem:
`vim.ui` is where user-interface "providers" live, which can be
overridden. It would also be useful to have a "providers" namespace for
platform-specific features such as "open", clipboard, python, and the other
providers listed in `:help providers`. We could overload `vim.ui` to
serve that purpose as the single "providers" namespace, but
`vim.ui.nodejs()` for example seems awkward.

Solution:
`vim.env` currently has too narrow of a purpose. Overload it to also be
a namespace for `vim.env.open`.

diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua
index 913f1fe20348..17d05ff37595 100644
--- a/runtime/lua/vim/_meta.lua
+++ b/runtime/lua/vim/_meta.lua
@@ -37,8 +37,28 @@ local options_info = setmetatable({}, {
   end,
 })

-vim.env = setmetatable({}, {
-  __index = function(_, k)
+vim.env = setmetatable({
+  open = setmetatable({}, {
+      __call = function(_, uri)
+        print('xxxxx'..uri)
+        return true
+      end,
+      __tostring = function()
+        local v = vim.fn.getenv('open')
+        if v == vim.NIL then
+          return nil
+        end
+        return v
+      end,
+    })
+  },
+  {
+  __index = function(t, k, ...)
+    if k == 'open' then
+      error()
+      -- vim.print({...})
+      -- return rawget(t, k)
+    end
     local v = vim.fn.getenv(k)
     if v == vim.NIL then
       return nil
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
---
Rejected experiment: move vim.ui.open() to vim.env.open()

Problem:
`vim.ui` is where user-interface "providers" live, which can be
overridden. It would also be useful to have a "providers" namespace for
platform-specific features such as "open", clipboard, python, and the other
providers listed in `:help providers`. We could overload `vim.ui` to
serve that purpose as the single "providers" namespace, but
`vim.ui.nodejs()` for example seems awkward.

Solution:
`vim.env` currently has too narrow of a purpose. Overload it to also be
a namespace for `vim.env.open`.

diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua
index 913f1fe20348..17d05ff37595 100644
--- a/runtime/lua/vim/_meta.lua
+++ b/runtime/lua/vim/_meta.lua
@@ -37,8 +37,28 @@ local options_info = setmetatable({}, {
   end,
 })

-vim.env = setmetatable({}, {
-  __index = function(_, k)
+vim.env = setmetatable({
+  open = setmetatable({}, {
+      __call = function(_, uri)
+        print('xxxxx'..uri)
+        return true
+      end,
+      __tostring = function()
+        local v = vim.fn.getenv('open')
+        if v == vim.NIL then
+          return nil
+        end
+        return v
+      end,
+    })
+  },
+  {
+  __index = function(t, k, ...)
+    if k == 'open' then
+      error()
+      -- vim.print({...})
+      -- return rawget(t, k)
+    end
     local v = vim.fn.getenv(k)
     if v == vim.NIL then
       return nil
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(vim.ui): vim.ui.open, "gx" without netrw</title>
<updated>2023-07-04T21:45:00+00:00</updated>
<author>
<name>marshmallow</name>
<email>marshycity@gmail.com</email>
</author>
<published>2023-04-30T05:53:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=af6e6ccf3dee815850639ec5613dda3442caa7d6'/>
<id>af6e6ccf3dee815850639ec5613dda3442caa7d6</id>
<content type='text'>
Co-authored-by: Mathias Fußenegger &lt;mfussenegger@users.noreply.github.com&gt;
Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;
Co-authored-by: ii14 &lt;59243201+ii14@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Mathias Fußenegger &lt;mfussenegger@users.noreply.github.com&gt;
Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;
Co-authored-by: ii14 &lt;59243201+ii14@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): InspectTree does not respect 'splitright' #22692</title>
<updated>2023-03-17T11:41:57+00:00</updated>
<author>
<name>Yochem van Rosmalen</name>
<email>yochem+git@icloud.com</email>
</author>
<published>2023-03-17T11:41:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2720d2c793b22e6c0c8719e5592922619fffdf7a'/>
<id>2720d2c793b22e6c0c8719e5592922619fffdf7a</id>
<content type='text'>
Problem:
vim.treesitter.inspect_tree() and :InspectTree does not respect 'splitright'.

Solution:
- Change the default `command` from `topleft 60vnew` to `60vnew`.
- Change :InspectTree to respect command mods (`:vertical`, count, etc.).

Closes #22656</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
vim.treesitter.inspect_tree() and :InspectTree does not respect 'splitright'.

Solution:
- Change the default `command` from `topleft 60vnew` to `60vnew`.
- Change :InspectTree to respect command mods (`:vertical`, count, etc.).

Closes #22656</pre>
</div>
</content>
</entry>
<entry>
<title>refactor!: rename vim.pretty_print =&gt; vim.print</title>
<updated>2023-03-13T00:25:09+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2023-03-07T15:04:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=673d2b52fa4335aa083c52e6686f0728e25b8ebd'/>
<id>673d2b52fa4335aa083c52e6686f0728e25b8ebd</id>
<content type='text'>
Problem:
The function name `vim.pretty_print`:
1. is verbose, which partially defeats its purpose as sugar
2. does not draw from existing precedent or any sort of convention
   (except external projects like penlight or python?), which reduces
   discoverability, and degrades signaling about best practices.

Solution:
- Rename to `vim.print`.
- Change the behavior so that
  1. strings are printed without quotes
  2. each arg is printed on its own line
  3. tables are indented with 2 instead of 4 spaces
- Example:
  :lua ='a', 'b', 42, {a=3}
  a
  b
  42
  {
    a = 3
  }

Comparison of alternatives:
- `vim.print`:
  - pro: consistent with Lua's `print()`
  - pro: aligns with potential `nvim_print` API function which will
    replace nvim_echo, nvim_notify, etc.
  - con: behaves differently than Lua's `print()`, slightly misleading?
- `vim.echo`:
  - pro: `:echo` has similar "pretty print" behavior.
  - con: inconsistent with Lua idioms.
- `vim.p`:
  - pro: very short, fits with `vim.o`, etc.
  - con: not as discoverable as "echo"
  - con: less opportunity for `local p = vim.p` because of potential shadowing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The function name `vim.pretty_print`:
1. is verbose, which partially defeats its purpose as sugar
2. does not draw from existing precedent or any sort of convention
   (except external projects like penlight or python?), which reduces
   discoverability, and degrades signaling about best practices.

Solution:
- Rename to `vim.print`.
- Change the behavior so that
  1. strings are printed without quotes
  2. each arg is printed on its own line
  3. tables are indented with 2 instead of 4 spaces
- Example:
  :lua ='a', 'b', 42, {a=3}
  a
  b
  42
  {
    a = 3
  }

Comparison of alternatives:
- `vim.print`:
  - pro: consistent with Lua's `print()`
  - pro: aligns with potential `nvim_print` API function which will
    replace nvim_echo, nvim_notify, etc.
  - con: behaves differently than Lua's `print()`, slightly misleading?
- `vim.echo`:
  - pro: `:echo` has similar "pretty print" behavior.
  - con: inconsistent with Lua idioms.
- `vim.p`:
  - pro: very short, fits with `vim.o`, etc.
  - con: not as discoverable as "echo"
  - con: less opportunity for `local p = vim.p` because of potential shadowing.
</pre>
</div>
</content>
</entry>
</feed>
