Open Tanish2002 opened 3 weeks ago
Can you provide this js code that can reproduce
@glepnir
I can't provide the exact code since it's confidential company code.. But here is a small reproduction of the same:
var Q = require('q');
var md5 = require('md5');
var Utils = require('../../../../lib/common-utils');
var QuotesValidator = require('../validation/QuotesValidation');
var PolicyCasesController = require('../../../common/controllers/PolicyCasesController');
let CommonController = require('../../../common/controllers/CommonController');
var WinstonLogUtils = require('../../../../lib/winston-log-utils');
let fwService = require('../services/fw_services');
let mySqlCommonService = require('../../../common/services/MySqlCommonService');
let Guid = require('guid');
let request = require('request');
var quotesRedis = require('../../../../lib/quotes-redis-connection');
function Quotes() {
this.quotes = {};
this.errors = {};
}
Quotes.prototype.getQuotes = async function(req, res) {
// some code
//
}
// some more very legacy code.. :<
module.exports = Quotes;
Just found that it seems to work but weirdly,
for example If I keep my cursor over PolicyCasesController
or WinstonLogUtils
it shows them in winbar, but not for any of the other imports or functions..
Screenshots:
Not working:
+1
For me working goods with some languages and not for others.
Can someone explain why nvimdev/lspsaga.nvim
not working with certain languages ?
Although I have installed LSP and tree-sitter and it works perfectly for text objects and syntax highlighting.
For Example: this working fine with lua
Neovim version:
MyConfig:
{
"nvim-lualine/lualine.nvim",
dependencies =
{
{
"nvim-tree/nvim-web-devicons"
},
{
"nvimdev/lspsaga.nvim",
event = { "LspAttach" },
dependencies = {
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
}
},
config = function()
local lualine = require("lualine")
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
local lspsaga = require('lspsaga')
lspsaga.setup({})
local lspsaga_bar = require("lspsaga.symbol.winbar")
local function breadcrumbs()
local bar = lspsaga_bar.get_bar()
if bar == nil then
return ""
end
return bar
end
lualine.setup({
options = {
theme = "catppuccin",
section_separators = { left = "", right = "" },
component_separators = { left = "", right = ""},
},
icons_enabled = true,
tabline = {},
globalstatus = true,
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = { 'filename' },
lualine_x = {
{
lazy_status.updates,
cond = lazy_status.has_updates,
color = { fg = "#ff9e64" }
},
{ "encoding" },
{ "fileformat" },
{ "filetype" },
},
lualine_y = { 'progress', 'searchcount' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { 'filename' },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
winbar = {
lualine_a = {},
lualine_b = {},
lualine_c = { breadcrumbs },
lualine_x = {},
lualine_y = {},
lualine_z = {}
},
inactive_winbar = {
lualine_a = {},
lualine_b = {},
lualine_c = { breadcrumbs },
lualine_x = {},
lualine_y = {},
lualine_z = {}
},
extensions = {}
}
)
end,
}
I'm experiencing a similar issue. I noticed that the breadcrumbs are consistently not appearing on the first file opened whenever starting nvim. It works fine for the rest.
Not working:
Working:
Note: autocmds.lua
is the first file I opened. If I close nvim, re-open it and open globals.lua
first the breadcrumbs are not working in that file.
Ex:
Describe the bug
The winbar provided by lspsaga only contains the File path. And not the lsp related symbols(functions, classes, etc) I tried navic and that seems to work fine, However I would like to use LspSaga for this since it provides nice highlighting..
Attaching some screenshots for your reference: LspSaga:
Navic:
Both screenshots are taken inside the same file and same function scope
Steps to reproduce
Relevant Config:
Expected behavior
Lspsaga shows function name as well as folder and file in winbar.
Neovim version (nvim -v)
v0.9.5
lspsaga commit
-
Terminal name/version
st