Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/mayask/tern-vimnav. vim-tmux-navigator for Tern: ctrl+h/j/k/l across Neovim splits and Tern panes
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930-- Seamless ctrl+h/j/k/l between Neovim splits and Tern panes.-- Pairs with the Tern plugin `vimnav`: at a Neovim edge, setting the title to-- `tern-nav:<direction>` asks Tern to move focus to the neighbouring pane.
local in_tern = vim.env.TERM_PROGRAM == "tern"
local function tern_move(direction) local title, titlestring = vim.o.title, vim.o.titlestring vim.o.title = true vim.o.titlestring = "tern-nav:" .. direction vim.cmd.redraw() vim.o.titlestring = titlestring vim.o.title = title vim.cmd.redraw()end
---@type LazySpecreturn { "mrjones2014/smart-splits.nvim", opts = { at_edge = function(ctx) if in_tern then tern_move(ctx.direction) else ctx.wrap() end end, },}