hover not working
Closed this issue · 2 comments
I'm trying to get this language server working in neovim but sadly the hover
action doesn't seem to be working. See this gif:
I'd expect some popup to be shown with the type of the variable my cursor currently is on. Did I get this wrong and the behavior is perfectly fine?
Other language servers like the ones for lua
or go
work fine.
Is this working for others? If so, can you reproduce with my config below? Do you have suggestions how to further track down the problem?
$ nvim --version
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742
Reduced config:
set runtimepath=$XDG_DATA_HOME/nvim/,$XDG_CONFIG_HOME/nvim,$VIMRUNTIME,$XDG_CONFIG_HOME/nvim/after
if !has('nvim')
set viminfo+='1000,n$XDG_DATA_HOME/nvim/viminfo
else
" Do nothing here to use the neovim default
" or do soemething like:
set viminfo+=n~/.shada
endif
let mapleader = "-"
let maplocalleader= ","
let g:python3_host_prog = "~/.local/share/nvim/nvim-env/bin/python3"
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.config/nvim/plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'teal-language/vim-teal'
call plug#end()
lua <<EOF
local util = require 'lspconfig.util'
local nvim_lsp = require('lspconfig')
local capabilities = nvim_lsp.util.default_config
local function on_attach_add(o)
return function(client, bufnr)
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
local opts = { noremap=false, silent=true }
buf_set_keymap('n', 'K', vim.lsp.buf.hover, opts)
end
end
local on_attach = on_attach_add{}
require'lspconfig'.teal_ls.setup{
on_attach = on_attach,
capabilities = capabilities,
root_dir = util.root_pattern("tlconfig.lua", ".git"),
}
EOF
This is particularly sad since at least querying the types (and also the completion for variables and entries in records) is some core feature when handling a codebase which is a bit bigger. Also it is maybe one of the big advantages of tl that the types are known and I hoped this would make coding easier.
Please try again since the codebase has since been mostly re-written
Oh thanks for working this project ❤️. This really makes working with teal much more productive and pleasant.
Installing the current version, hover
works now (as well as annotations for some errors) 👍