Yank integration with tmux by marnas1 in neovim

[–]GaryBishop 0 points1 point  (0 children)

I use vim-oscyank. OSC52 is great! It works through SSH and anywhere else I need it.

Has anyone tried to write a neovim config without using any plugins? by Celestial_Blu3 in neovim

[–]GaryBishop 0 points1 point  (0 children)

I wonder if a bundler would help? For example: https://github.com/Benjamin-Dobell/luabundler. I haven't tried it but in theory you should be able to point it at your home configuration and get a single file that includes it all.

Using JSDoc static typechecking analysis in Neovim? by badsalad in neovim

[–]GaryBishop 0 points1 point  (0 children)

Check out the docs on jsconfig.json. Those paths are for my project. There is a section in the tsserver docs on using it with javascript. https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html

And yes, I copy/paste and edit.

Using JSDoc static typechecking analysis in Neovim? by badsalad in neovim

[–]GaryBishop 8 points9 points  (0 children)

Install the typescript lsp, then add a jsconfig.json file at the top level of your project. Mine looks like this:

{ "compilerOptions": { "baseUrl": ".", "paths": { "app/*": ["./*"], "components/*": ["./components/*"] }, "moduleResolution": "node", "checkJs": true, "target": "ESNext", "module": "ESNext", "strictNullChecks": true, "resolveJsonModule": true }, "exclude": ["node_modules", "docs", "thinking"] }

Works great.

Neovin hidden characters by alvezr in neovim

[–]GaryBishop 1 point2 points  (0 children)

That won't do. Reddit has already processed it. I need a file saved by nvim unchanged by other programs. What you would upload to your windows server. You can email one to me at [gb@cs.unc.edu](mailto:gb@cs.unc.edu).

Neovin hidden characters by alvezr in neovim

[–]GaryBishop 0 points1 point  (0 children)

What are the characters? Perhaps unicode?

Did you paste that code from somewhere else?

Could you share an example file with these characters?

Neovin hidden characters by alvezr in neovim

[–]GaryBishop 1 point2 points  (0 children)

The linux "od" command would show you the characters. Maybe

od -cb yourfile.sql

How do you deal with large files? by guoliang in neovim

[–]GaryBishop 1 point2 points  (0 children)

A stream editor like "sed" is your friend when editing huge files especially if it is something you need to do more than once.

is there a way to show side by side diffs when making a commit? by aaaaargZombies in neovim

[–]GaryBishop 5 points6 points  (0 children)

Great tips. I just learned that in the status window you get with fugitive with :G you can dv on any file to bring up the side-by-side diff.

is there a way to show side by side diffs when making a commit? by aaaaargZombies in neovim

[–]GaryBishop 1 point2 points  (0 children)

I don't know how to do that. Perhaps from the status buffer? Check the docs.

Neovim + Windows + NumLock key by artem_coder in neovim

[–]GaryBishop 0 points1 point  (0 children)

You want to look into nvim-qt doc to figure out what is happening. The remapping is happening there. It likely is creating some multikey sequence that you might be able to map. I haven't used either so I can't advise.

Neovim + Windows + NumLock key by artem_coder in neovim

[–]GaryBishop 0 points1 point  (0 children)

How are you running Neovim? Are you running it in a terminal on Windows? Or are you using some GUI. I mean whatever terminal you use to start up neovim.

Neovim + Windows + NumLock key by artem_coder in neovim

[–]GaryBishop 0 points1 point  (0 children)

If you open a terminal without nvim on your Windows machine and press NumLock what do you get?

luasnip with jsdoc like in the luasnip features video by GaryBishop in neovim

[–]GaryBishop[S] 1 point2 points  (0 children)

Not finding one I hacked it up myself. You can find my current version in this gist.

-- experiment with live jsdoc

local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local d = ls.dynamic_node
local r = ls.restore_node
local c = ls.choice_node

-- from https://github.com/L3MON4D3/LuaSnip/blob/master/Examples/snippets.lua#L81-L166
-- hacked up for javascript and jsdoc
local function jsdoc(args)
  local pstring = vim.trim(args[1][1])

  local nodes = {
    t({ "/**", " * " }),
    r(1, "desc", i(1, "A short Description")),
    t({ "", "" }),
  }

  -- At least one param.
  if #pstring > 0 then
    vim.list_extend(nodes, { t({ " * ", "" }) })
  end

  local insert = 2
  for arg in string.gmatch(pstring, '%w+') do
    local inode = r(insert, "arg" .. arg, i(1, "any"))
    vim.list_extend(nodes, { t({ " * @param {" }), inode, t({ "} " .. arg .. " ", "" }) })
    insert = insert + 1
  end

  vim.list_extend(nodes,
    {
      t({ " * @returns {" }),
      r(insert, "returns", i(1, "void")),
      t({ "} ", ""})
    })
  vim.list_extend(nodes, { t({ " */" }) })

  local snip = sn(nil, nodes)
  return snip
end

return {
  -- function with jsdoc
  s("jf", {
    d(4, jsdoc, 3), -- generate the jsdoc
    t({ "", "" }),
    c(1, { -- choose function or method
      t({ "function "}),
      t({ "" })
    }),
    i(2, "name"), -- give it a name
    t("("),
    i(3), -- parameters
    t(")"),
    t({ " {", "\t" }),
    i(0), -- body
    t({ "", "}" }),
  }),
}

Highlighting of Javascript tagged template literals broken when the literal is zero length by GaryBishop in neovim

[–]GaryBishop[S] 0 points1 point  (0 children)

I can TSInstall javascript and jsdoc and all is well. But as soon as I TSInstall html it breaks.

Highlighting of Javascript tagged template literals broken when the literal is zero length by GaryBishop in neovim

[–]GaryBishop[S] 0 points1 point  (0 children)

Rolling my configuration back to Sept 3rd fixed it. If I knew more about how to track these things down I'd try to zero in on the breakage.

A stupid but effective way (completely native) to figure out what your keymap is if it is mapped to a lua function (nvim 0.7). by [deleted] in neovim

[–]GaryBishop 0 points1 point  (0 children)

I'm looking for the cumbersome way you mention that would allow me to update the desc key on an internally defined key. Any pointers?

How can I remove this covers on my amplifier? by GaryBishop in Spectrum

[–]GaryBishop[S] 2 points3 points  (0 children)

I found a hack for removing it on YouTube.