Scythe
SCYTHE is a lightweight, C#-based game engine focused on modifiability and rapid iteration using Raylib.
Nvim lua plugin which adds support for twoslash queries into typescript projects
git clone https://github.com/marilari88/twoslash-queries.nvim.gitmarilari88/twoslash-queries.nvimWritten in lua for nvim
Inspired by vscode-twoslash-queries, this plugin allows you to print typescript types as inline virtual text and dynamically update it instantly without having to move the cursor over the inspected variable
This is particularly useful when you are playing with complex typescript types:
use("marilari88/twoslash-queries.nvim")
Make sure you have typescript language server properly installed and configured (personally I use Mason and Lspconfig plugins)
Then attach it on your tsserver in lspconfig setup
require("lspconfig")["tsserver"].setup({
on_attach = function(client, bufnr)
require("twoslash-queries").attach(client, bufnr)
end,
})
Optionally you can define a custom keymap for TwoslashQueriesInspect command
vim.api.nvim_set_keymap('n',"<C-k>","<cmd>TwoslashQueriesInspect<CR>",{})
You can override default config use setup function:
use({
"marilari88/twoslash-queries.nvim",
config = function()
require("twoslash-queries").setup({
multi_line = true, -- to print types in multi line mode
is_enabled = false, -- to keep disabled at startup and enable it on request with the TwoslashQueriesEnable
highlight = "Type", -- to set up a highlight group for the virtual text
})
end,
})
Default config:
Write a // ^? placing the sign ^ under the variable to inspected:
const variableToInspect = .... // ^?
:TwoslashQueriesEnable Enable the plugin for the current session
:TwoslashQueriesDisable Disable the plugin for the current session
:TwoslashQueriesInspect Inspect variable under the cursor
:TwoslashQueriesRemove Remove all twoslash queries in the current buffer
Please raise a PR if you are interested in adding new functionality or fixing any bugs. When submitting a bug, please include an example spec that can be tested.
more like this
SCYTHE is a lightweight, C#-based game engine focused on modifiability and rapid iteration using Raylib.
Open the next door in your Vim journey — personalized command discovery based on your actual usage
search projects, people, and tags