Skip to content
Discussion options

You must be logged in to vote

Share my "glance.nvim" style lsp goto configurations here, incase people also want it:

local function clamp(v, min_val, max_val)
  local res = v
  if max_val ~= nil then
    res = vim.fn.min({ res, max_val })
  end
  if min_val ~= nil then
    res = vim.fn.max({ res, min_val })
  end
  return res
end

local function get_cursor_winopts()
  local winnr = vim.api.nvim_get_current_win()
  local win_first_lineno = vim.fn.line("w0")
  local win_height = vim.api.nvim_win_get_height(winnr)
  local win_width = vim.api.nvim_win_get_width(winnr)
  local win_pos = vim.api.nvim_win_get_position(winnr)
  -- local win_y = win_pos[1]
  local win_x = win_pos[2]
  local border = constants.window.border

  l…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@linrongbin16
Comment options

@linrongbin16
Comment options

Answer selected by linrongbin16
@linrongbin16
Comment options

@ibhagwan
Comment options

@linrongbin16
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants