Coder Social home page Coder Social logo

lspsaga.nvim's Introduction

lspsaga.nvim

A maintained fork of glepnir/lspsaga.nvim.

Lspsaga is light-weight lsp plugin based on neovim built-in lsp with highly a performant UI. SEE IN ACTION

Features

TODO .......

Install

Packer

use { 'kkharji/lspsaga.nvim' }  -- nightly
use { 'kkharji/lspsaga.nvim', branch = 'nvim6.0' or 'nvim51' } -- for specific version

Requirements

  • neovim/nvim-lspconfig

Setup

Lspsaga support use command Lspsaga with completion or use lua function.

local lspsaga = require 'lspsaga'
lspsaga.setup { -- defaults ...
  debug = false,
  use_saga_diagnostic_sign = true,
  -- diagnostic sign
  error_sign = "",
  warn_sign = "",
  hint_sign = "",
  infor_sign = "",
  diagnostic_header_icon = "",
  -- code action title icon
  code_action_icon = "",
  code_action_prompt = {
    enable = true,
    sign = true,
    sign_priority = 40,
    virtual_text = true,
  },
  finder_definition_icon = "",
  finder_reference_icon = "",
  max_preview_lines = 10,
  finder_action_keys = {
    open = "o",
    vsplit = "s",
    split = "i",
    quit = "q",
    scroll_down = "<C-f>",
    scroll_up = "<C-b>",
  },
  code_action_keys = {
    quit = "q",
    exec = "<CR>",
  },
  rename_action_keys = {
    quit = "<C-c>",
    exec = "<CR>",
  },
  definition_preview_icon = "",
  border_style = "single",
  rename_prompt_prefix = "",
  rename_output_qflist = {
    enable = false,
    auto_open_qflist = false,
  },
  server_filetype_map = {},
  diagnostic_prefix_format = "%d. ",
  diagnostic_message_format = "%m %c",
  highlight_prefix = false,
}

Example Keymapings

--- In lsp attach function
local map = vim.api.nvim_buf_set_keymap
map(0, "n", "gr", "<cmd>Lspsaga rename<cr>", {silent = true, noremap = true})
map(0, "n", "gx", "<cmd>Lspsaga code_action<cr>", {silent = true, noremap = true})
map(0, "x", "gx", ":<c-u>Lspsaga range_code_action<cr>", {silent = true, noremap = true})
map(0, "n", "K",  "<cmd>Lspsaga hover_doc<cr>", {silent = true, noremap = true})
map(0, "n", "go", "<cmd>Lspsaga show_line_diagnostics<cr>", {silent = true, noremap = true})
map(0, "n", "gj", "<cmd>Lspsaga diagnostic_jump_next<cr>", {silent = true, noremap = true})
map(0, "n", "gk", "<cmd>Lspsaga diagnostic_jump_prev<cr>", {silent = true, noremap = true})
map(0, "n", "<C-u>", "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1, '<c-u>')<cr>", {})
map(0, "n", "<C-d>", "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(1, '<c-d>')<cr>", {})

Customize Appearance

Colors

Colors can be simply changed by overwriting the default highlights groups LspSaga is using.

highlight link LspSagaFinderSelection Search
" or
highlight link LspSagaFinderSelection guifg='#ff0000' guibg='#00ff00' gui='bold'

The available highlight groups are:

Group Name Description
LspSagaFinderSelection Currently active entry in the finder window that gets previewed.
LspFloatWinNormal
LspFloatWinBorder
LspSagaBorderTitle
TargetWord
ReferencesCount
DefinitionCount
TargetFileName
DefinitionIcon
ReferencesIcon
ProviderTruncateLine
SagaShadow
LspSagaFinderSelection
DiagnosticTruncateLine
DiagnosticError
DiagnosticWarning
DiagnosticInformation
DiagnosticHint
DefinitionPreviewTitle
LspSagaShTruncateLine
LspSagaDocTruncateLine
LineDiagTuncateLine
LspSagaCodeActionTitle
LspSagaCodeActionTruncateLine
LspSagaCodeActionContent
LspSagaRenamePromptPrefix
LspSagaRenameBorder
LspSagaHoverBorder
LspSagaSignatureHelpBorder
LspSagaCodeActionBorder
LspSagaAutoPreview
LspSagaDefPreviewBorder
LspLinesDiagBorder

Filetypes

Autocmds can be added for dedicated filetypes of LspSaga floating windows. For example, one can use <Esc> to close the hover window when jumping into it by calling :Lspsaga hover_doc twice.

augroup lspsaga_filetypes
  autocmd!
  autocmd FileType LspsagaHover nnoremap <buffer><nowait><silent> <Esc> <cmd>close!<cr>
augroup END

The available filetypes are:

  • LspsagaCodeAction
  • LspsagaDiagnostic
  • LspsagaFinder
  • LspsagaFloaterm
  • LspsagaHover
  • LspsagaRename
  • LspsagaSignatureHelp

License

MIT

lspsaga.nvim's People

Contributors

adelarsq avatar againxx avatar akinsho avatar alex-popov-tech avatar alienover avatar aprowe avatar avimitin avatar c0r73x avatar ckipp01 avatar cooperuser avatar danielpower avatar dirn avatar elianiva avatar ellisonleao avatar frandsoh avatar glepnir avatar guihig avatar gustavokatel avatar hgaiser avatar hudsonmc16 avatar jesstelford avatar kkharji avatar kuznetsss avatar m-demare avatar onsails avatar pedro757 avatar sisodiaa avatar tamago324 avatar tapayne88 avatar weilbith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lspsaga.nvim's Issues

Cannot view line diagnostics

Description

Cannot view line diagnostics, lspsaga errors out. I'm using the lua LSP server for this.

Expected Behavior
Work correctly, and show the line diagnostics

Actual Behavior
It gives this error currently:

E5108: Error executing lua .../pack/packer/opt/lspsaga.nvim/lua/lspsaga/diagnostic.lua:86: attempt to call field '_get_floating_severity
_highlight_name' (a nil value)

Neovim Built in Behavior

Execuring vim.lsp.diagnostic.show_line_diagnostics by itself errors out.

E5107: Error loading lua [string ":lua"]:1: '=' expected near '<eof>'

But when appending = true to it, nothing happens, but it doesn't error out either.

Details

Reproduce

nvim -u test.vim the min config that only lspsaga

Where is the min config?

post your program language min code snippet that can reproduce your issue

-- Undo break points
wk.register({
��	["."] = { ".<c-g>u", "Insert . and set undo breakpoint" },
	[","] = { ",<c-g>u", "Insert , and set undo breakpoint" },
	["!"] = { "!<c-g>u", "Insert ! and set undo breakpoint" },
	["?"] = { "?<c-g>u", "Insert ? and set undo breakpoint" },
}, { mode = "i" })

img

Environment
  • nvim --version output:
NVIM v0.6.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/build/config -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/src -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/.deps/usr/include -I/usr/include -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/build/src/nvim/auto -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/build/include
Compiled by buildd@lgw01-amd64-045

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • Operating system: Pop!_OS 20.04 LTS
  • lspsaga commit: bafeddf

How to define a hotkey to show/hide Saga / LSP output?

Hi, I'm a total newb, trying to set up an neovim IDE for myself for a Ruby project, is there a setting to "hide" diagnostics output from rubocup/solargraph?

As I understand it from your sample config from here and from the very helpful https://anchietajunior.hashnode.dev/neovim-lsp-commands-lsp-saga-configuration-and-functionalities there is "show line diagnostics" and "show cursor diagnostics", and they all work just dandy, but how do I hide the output unless I want it shown?

Best
Matej

Keybindings showing error `Expected 5 arguments`

Description

When i try the keymappings for smart_scroll_with_saga it is giving the error

E5113: Error while calling lua chunk: .config/nvim/lua/plugins/lspsaga.lua:60: Expected 5 arguments
stack traceback:
        [C]: in function 'nvim_buf_set_keymap'

Trouble with nvim51 branch

@tami5 First of all thank you for supporting this fork!

I have an error on nvim51 branch with nvim 0.5.1 while trying to execute Lspsaga diagnostic_jump_next:

E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'lspsaga.command'

Here is my setup:

lua << EOF
require('lspsaga').setup {
    border_style = 'round'
}
EOF

nnoremap <silent> <C-j> <Cmd>Lspsaga diagnostic_jump_next<CR>
inoremap <silent> <C-k> <Cmd>Lspsaga signature_help<CR>
nnoremap <silent> gh :Lspsaga lsp_finder<CR>
nnoremap <silent> K :Lspsaga hover_doc<CR>
nnoremap <silent> <leader>ca :Lspsaga code_action<CR>
nnoremap <silent> gd :Lspsaga preview_definition<CR>

Any recommendations?

Codelens support

Is your feature request related to a problem? Please describe.
It would be nice to support codelens actions.

Describe the solution you'd like

Support displaying codelenses in virtual text and a way to run the code lens actions.

Rename action puts cursor in middle of word

Description

When I activate Lspsaga rename with the command or keymap the current word is in the popup and the cursor is in the middle of it.
image

Expected Behavior
When I activate Lspsaga rename with the command or keymap so pop-up with the current word and cursor at the beginning or end of it, but not in the middle.

Details

Environment
  • nvim --version output:
NVIM v0.6.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.6.0/share/nvim"
  • Operating system: macOS Monterey 12.0.1
  • lspsaga commit: Latest update with PackerSync
  • Lspsaga config:
local saga = require 'lspsaga'

saga.init_lsp_saga {
  border_style = "round",
  error_sign = "✗",
  warn_sign = "⚠",
  code_action_prompt = {
   enable = true,
   sign = true,
   sign_priority = 20,
   virtual_text = false,
  },
}
  • nvim-lspconfig config (only lspsaga related)
	buf_set_keymap("n", "<Leader>rn", "<cmd>Lspsaga rename<cr>", opts)
	buf_set_keymap("n", "<Leader>lf", [[<cmd>lua require'lspsaga.provider'.lsp_finder()<CR>]], opts)
	buf_set_keymap("n", "<Leader>cd", [[<cmd>lua require'lspsaga.diagnostic'.show_line_diagnostics()<CR>]], opts)
	buf_set_keymap("n", "<Leader>ca", [[<cmd>lua require('lspsaga.codeaction').code_action()<CR>]], opts)
	buf_set_keymap("v", "<Leader>ca", [[:<C-U>lua require('lspsaga.codeaction').range_code_action()<CR>]], opts)
	buf_set_keymap("n", "K", [[<cmd>lua require('lspsaga.hover').render_hover_doc()<CR>]], opts)

Allow to jump to definition in lsp finder

Is your feature request related to a problem? Please describe.
I really dont want to have a seperate keybinding when jumping to the definition vs finding it

Describe the solution you'd like
being able to press enter on a result or the result number to jump to it

Describe alternatives you've considered
Create a seperate keybinding

Additional context
Also how do you actually close the lsp finder window?

Error with diagnostic module in Neovim 0.5.1

Description

  1. nvim 0.5.1 when opened is showing following error
    E5108: Error executing lua ...nfig/nvim/bundle/lspsaga.nvim/lua/lspsaga/diagnostic.lua:13: attempt to index field 'diagnostic' (a nil value),
  2. Further it shows following error when one tries to see the diagnostic message via lspsaga
    E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'lspsaga.diagnostic'

Expected Behavior

  1. nvim should open without any error
  2. diagnostic message should be visible in the lspsaga window

Actual Behavior

  1. E5108: Error executing lua ...nfig/nvim/bundle/lspsaga.nvim/lua/lspsaga/diagnostic.lua:13: attempt to index field 'diagnostic' (a nil value)
  2. E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'lspsaga.diagnostic'

Neovim Built in Behavior
vim.lsp.diagnostic.show_line_diagnostics() works fine as expected.

Details

Environment
  • nvim --version output: NVIM v0.5.1
  • lspsaga commit: 5094e74

Consistent variable window style

Can the border lines be changed to the same style? instead of having multiple colors?

For the obsessive-compulsive disorder like me, I always want to see all the outer borders of the plugin are the same color, such as hover, rename, diagnostics, etc. I believe there are not a few people who have this idea.

Of course, hover and rename can be modified by themselves, but diagnostics cannot modify the border line by themselves.

Is it possible to open up a configuration option so that everyone can choose whether to enable uniform color style lines?

图片

Missing code actions for typescript

Description

WIth typescript, when missing an import, calling the nvim lsp code actions suggest the import, but lsp saga does not.

Expected Behavior

Suggest the import just like the nvim code actions does.

Actual Behavior

No code actions available

Neovim Built in Behavior

Code actions suggesting the import.

Details

Reproduce

I've started a typescript project with mkdir asd && cd asd && yarn init -y && yarn add typescript, then I've created two files:

helper.ts:

export class Hello {
  name = "Hello!"
}

export function bye() {
  return "bye";
}

main.ts:

import { Hello } from "./helper";

console.log(new Hello())
console.log(bye())

bye is not imported, so there's an error. Trying to get code actions:

saga.mp4
Environment
  • nvim --version output:
NVIM v0.6.0-dev+496-gc5525f265
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions     -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security     -fstack-clash-protection -fcf-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/paulo/.cache/yay/neovim-git/src/build/config -I/home/paulo/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/paulo/.cache/yay/neovim-git/src/build/src/nvim/auto -I/home/paulo/.cache/yay/neovim-git/src/build/include
Compiled by paulo@nancy
  • Operating system: Arch Linux btw
  • lspsaga commit: 8281092

Error when run `Lspsaga lsp_finder without save the file first

Error when run <cmd>Lspsaga lsp_finder<CR> without save the file first.

bug

E5108: Error executing lua .../pack/packer/start/lspsaga.nvim/lua/lspsaga/provider.lua:408: Vim(ed
it):E37: No write since last change (add ! to override)
stack traceback:
        [C]: in function 'nvim_command'
        .../pack/packer/start/lspsaga.nvim/lua/lspsaga/provider.lua:408: in function 'open_link'
        .../pack/packer/start/lspsaga.nvim/lua/lspsaga/provider.lua:477: in function 'open_link'
        [string ":lua"]:1: in main chunk

Adhoc buffer creation or option to restrict the number of buffers / entries when using lsp_finder

Is your feature request related to a problem? Please describe.

Working with code that has a lot of references can cause problems when using lsp_finder in combination with other plugins. I guess mostly because a buffer is created for each entry.

Error executing vim.schedule lua callback: Vim(lua):E5108: Error executing lua ...k/packer/start/gitsigns.nvim/lua/gitsigns/subprocess.lua:71: Failed to spawn process: {                                                                                                                                                                                                                     
  _state = {                                                                                                                                                                                                                                                                                                                                                                                  
    pid = "EMFILE: too many open files",                                                                                                                                                                                                                                                                                                                                                      
    stderr = <userdata 1>,                                                                                                                                                                                                                                                                                                                                                                    
    stderr_data = {},                                                                                                                                                                                                                                                                                                                                                                         
    stdout = <userdata 2>,                                                                                                                                                                                                                                                                                                                                                                    
    stdout_data = {}                                                                                                                                                                                                                                                                                                                                                                          
  },                                                                                                                                                                                                                                                                                                                                                                                          
  args = { "--no-pager", "config", "user.name" },                                                                                                                                                                                                                                                                                                                                             
  command = "git"                                                                                                                                                                                                                                                                                                                                                                             
} 

Describe the solution you'd like

I don't know how difficult, slow and resource heavy it would be to create a buffer on the fly. If it is reasonable, the finder could create the buffer only when a reference is actually inspected instead of creating them all in advance.

Describe alternatives you've considered

If adhoc buffer creation is not feasible, maybe an option to restrict the number of buffers or entries in the finder could be added.

Make Diagnostics copyable

Hey there, it happens from time to time that i need to google some error that the LSP diagnostics throws. Right now I am not able to simply copy&paste the line_diagnostics, is there any way to make the text of the diagnostics copyable?

cursor is misplaced on lsp_finder window

Description

When opening the references preview lua require'lspsaga.provider'.lsp_finder(), cursor and syntax highlighting is misaligned. See attached video.

Screen.Recording.2021-10-05.at.5.26.46.PM.mov

Expected Behavior
Cursor should align correctly with the file that's being previewed.

Actual Behavior
Cursor is always 3 lines above where it should be.

Neovim Built in Behavior
Neovim does not have this built-in. The built-in behaviour uses a quickfix list.

Details

Reproduce
  1. Attempt to use lua require'lspsaga.provider'.lsp_finder() on any symbol.
  2. Notice that the cursor is 3 lines higher than the item that's being previewed.
Environment
  • nvim --version output:
NVIM v0.5.1
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/config -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/src/nvim/auto -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/include
Compiled by brew@BigSur

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.5.1/share/nvim"

Run :checkhealth for more info
  • Operating system: MacOS 11.6.
  • lspsaga commit: 373bc03

Unexpectedly jump to floating window when call signature_help twice

Description

Not sure if it's a bug or normal behavior. If it's not a bug, I will close this issue.

When calling Lspsaga signature_help twice, it will leave insert mode and jump into the floating window of signature help. I am used to hook Lspsaga signature_help on CursorHoldI event. So, if I leave my cursor on a function call and idle a few seconds in insert mode, it will auto leave insert mode and jump to the floating window.

I think this is caused from this pull request. I have checked the documentation of lsp. When calling vim.lsp.buf.hover() twice, the cursor will jump to floating window. But vim.lsp.buf.signature_help() doesn't have this behavior.

Expected Behavior

Just show the floating window after calling Lspsaga signature_help multiple times.

Actual Behavior

It shows the floating window and jumps into the window after calling Lspsaga signature_help twice.

Neovim Built in Behavior

According to documentation, the default behavior of vim.lsp.buf.signature_help() doesn't jump to the window.

Details

Reproduce
  1. Use autocmd to configure event:

In Vimscript

autocmd CursorHoldI * Lspsaga signature_help

In lua

vim.api.nvim_command('autocmd CursorHoldI * Lspsaga signature_help')
  1. Open a program file which has language server support.
  2. Enter insert mode and move cursor to brackets of a function call
  3. Wait a second.
Environment
  • nvim --version output:
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az87-780

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info
  • Operating system: Ubuntu 20.04
  • lspsaga commit: 511a335

Pressing <CR> while in Lspsaga code_action() doesn't work

Description

I have assigned the macro to the Lspsaga code_action(), the menu appears when I pressed this macro in a good situation.

Expected Behavior
It should implement abstract members (for example)

Actual Behavior
It does nothing

Neovim Built in Behavior
It displays what I want as Lspsaga code_action

Details

// Just installed lspsaga in my nvim lua configuration

I'm using C# and LSP servers

Code action throws error

Description

If I try to apply a code action, an error message gets printed.

Expected Behavior
The action should be executed as usual.

Actual Behavior
This error message gets printed:

apply_text_document_edit must be called with valid offset encoding
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp/util.lua:366: offset_encoding: expected string, got nil stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        /usr/share/nvim/runtime/lua/vim/lsp/util.lua:366: in function 'apply_text_edits'
        /usr/share/nvim/runtime/lua/vim/lsp/util.lua:546: in function 'apply_text_document_edit'
        /usr/share/nvim/runtime/lua/vim/lsp/util.lua:765: in function 'apply_workspace_edit'
        ...im/site/pack/packer/opt/lspsaga.nvim/lua/lspsaga/api.lua:16: in function 'execute'
        ...im/site/pack/packer/opt/lspsaga.nvim/lua/lspsaga/api.lua:45: in function 'handler'
        /usr/share/nvim/runtime/lua/vim/lsp.lua:1025: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Details

Reproduce
  1. Open buffer with attached lsp server
  2. Run command :Lspsaga code_action
  3. Execute a code action that changes the buffer
Environment
  • nvim --version output: NVIM v0.7.0
  • Operating system: Arch Linux 5.17.4-arch1-1
  • lspsaga commit: dc41d1d

Jump to Location of Implementation

When I view implementations via vim.lsp.buf.implementation(), it spawns a nice looking window but It does not provide any way to jump to the location. I recall looking at the code and seeing that it does not have that functionality.
I'm happy to help on this front, anyone tried this or know how to tackle it?

Break Fork

I like the plugin you maintained. if you break the fork, I can find the repo easily..

The latest git commit (with the latest nightly build) makes lspsaga unusable

Description

Constant errors pointing to line 8 of api.lua. This is immediately noticeable upon opening any buffer from either netrw or nvim-tree.
Expected Behavior

Expected behavior is that the diagnostics are gotten and returned to inform the user.
Actual Behavior

Upon entering the buffer (and upon each user action afterwards) an error appears complaining about api.lua line 8 that "attempt to index 'diagnostic' (a nil value)
Below is the relevant output from nvim.log

Executing User Autocommands for "LspDiagnosticsChanged"
autocommand lua require'trouble'.refresh({auto = true, provider = "diagnostics"})

Executing CursorHold Autocommands for "*"
autocommand :lua require('symbols-outline')._highlight_current_item()

autocommand lua require'lspsaga.codeaction.indicator'.check()

Error detected while processing CursorHold Autocommands for "*":
E5108: Error executing lua .../site/pack/packer/start/lspsaga.nvim/lua/lspsaga/api.lua:8: attempt to index field 'diagnostic' (a nil value)
autocommand :lua require('symbols-outline')._highlight_current_item()

Neovim Built in Behavior

Details

Reproduce
  1. nvim -u test.vim the min config that only lspsaga
  2. post your program language min code snippet that can reproduce your issue
1. Update to the latest commit from this repo (I use packer for this) 2. Open any buffer from navigation (netrw or nvim-tree)
Environment
  • nvim --version output: NVIM v0.6.0-dev+1504-g9132b76da
  • Operating system: macOS
  • lspsaga commit: e8358c4

Diagnostics multiline not highlighted

Description

It seems like diagnostics that wrap don't get highlighted.

124690533-5b25ad80-dea8-11eb-9a25-3b680455c07b

Expected Behavior
All lines should be highlighted.

Actual Behavior
The last part does not get highlighted.

Neovim Built in Behavior
All text is highlighted.

Screen Shot 2021-11-01 at 00 51 06

Details

Reproduce
  1. Using basic config. Example in python using pyright.
  2. print("1"+1)
Environment
  • nvim --version output:
NVIM v0.5.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az87-829

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/runner/work/neovim/neovim/build/nvim.AppDir/usr/share/nvim"
  • Operating system: macOS Catalina 10.15.7
  • lspsaga commit: c884214b57fea2f5f6f04e1245a3e55cc19bbe96

Definition preview treesitter issues

Description

When using the definition preview, tree sitter does not highlight correctly.

Expected Behavior
It to display with correct highlighting

Actual Behavior
I'm getting incomplete/wrong highlighting.
image

Neovim Built in Behavior
I don't think this feature comes in neovim

Details

Reproduce

I have no idea as it randomly doesnt work randomly does work.

Environment
  • nvim --version output:
glowsquid on  feature/ui/button [!] via  v16.14.2 via 🦀 v1.59.0
❯ nvim --version
NVIM v0.8.0-dev+57-gaf82eab94
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions     -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security     -fstack-clash-protection -fcf-protection -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/tntman/.cache/paru/clone/neovim-git/src/build/config -I/home/tntman/.cache/paru/clone/neovim-git/src/neovim-git/src -I/usr/include -I/home/tntman/.cache/paru/clone/neovim-git/src/build/src/nvim/auto -I/home/tntman/.cache/paru/clone/neovim-git/src/build/include
Compiled by tntman

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • Operating system: Linux GAMER-PC 5.17.4-arch1-1 #1 SMP PREEMPT Wed, 20 Apr 2022 18:29:28 +0000 x86_64 GNU/Linux
  • lspsaga commit: latest

Organize imports function of code action is giving Error.

Description

I'm using nvim-jdtls for java development and I need import functionality of lspsaga but when I use it displays a error.
2022-01-09-211138_1366x768_scrot

Expected Behavior

Like in the above image a class is created in different file so it should import that class in the current file using statement import.
Actual Behavior

Shows a error attached above.

Environment
  • nvim --version output: 0.6.1
  • Operating system: Arch Linux
  • lspsaga commit:

Error after update

Description

I updated lspsaga to latest version. After initialisation lsp in project it shows this error:

E5108: Error executing lua vim/shared.lua:218: t: expected table, got nil                                                                                                                                            
stack traceback:                                                                                                                                                                                                     
        [C]: in function 'error'                                                                                                                                                                                     
        vim/shared.lua:608: in function 'validate'                                                                                                                                                                   
        vim/shared.lua:218: in function 'tbl_contains'                                                                                                                                                               
        .../start/lspsaga.nvim/lua/lspsaga/codeaction/indicator.lua:75: in function 'check'                                                                                                                          
        [string ":lua"]:1: in main chunk        

I didn't made any action, error is showing automatically.

Environment
  • nvim --version output:
NVIM v0.7.0-dev+704-gac2d140a3
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az87-49

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

  • Operating system: Manjaro
  • lspsaga commit: 3cd3c4b

Error: line value outside range

Description

While switching between buffers I get the error:

Error executing vim.schedule lua callback: .../start/lspsaga.nvim/lua/lspsaga/codeaction/indicator.lua:37: line value outside range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        .../start/lspsaga.nvim/lua/lspsaga/codeaction/indicator.lua:37: in function 'callback'
        ....mount_nvimc4Z54u/usr/share/nvim/runtime/lua/vim/lsp.lua:1472: in function 'handler'
        ....mount_nvimc4Z54u/usr/share/nvim/runtime/lua/vim/lsp.lua:964: in function 'cb'
        vim.lua:285: in function <vim.lua:285>

Expected Behavior

No error while switching between buffers.

Actual Behavior

The error appears from time to time.

Neovim Built in Behavior

I'm not sure about the question but I suppose built in behaviour doesn't produce any errors 😄

Details

Reproduce I don't have exact steps to reproduce it happens randomly when working with couple python files with pylsp enabled.
Environment
  • nvim --version output:
NVIM v0.6.1
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
  • Operating system:
Ubuntu 18.04.5 LTS
Kernel: 4.19.119-30.2
  • lspsaga commit:
65e9ca7fb147668ce3f7321f8d734ae9b754241c

LSP icons not displayed in the gutter, only colored letters

Description

The LSP warning signs in the gutter don't display any icons anymore. It only shows the colored letter ( I, W, E).

Here's my plugin config:

{
	'tami5/lspsaga.nvim',
	event = 'BufReadPost',
	config = function()
	require('lspsaga').init_lsp_saga()
	end
}

I also have nvim-web-devicons installed.


Expected Behavior

Show the LSP icons in the gutter.


Actual Behavior

Only displays the colored letters, I, W, E etc
letters


Details

Environment
  • nvim --version output:
NVIM v0.6.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/build/config -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/src -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/.deps/usr/include -I/usr/include -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/build/src/nvim/auto -I/build/neovim-2TrRir/neovim-0.6.0~ubuntu1+git202109291222-ec4731d98-adeb5640f/build/include
Compiled by buildd@lgw01-amd64-045

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info
  • Operating system: Pop!_OS 20.04 LTS
  • lspsaga commit: bafeddf

`lsp_finder`: not working if LSP is running in single file mode

Description

  1. Open a file that's not in a project, so there is no root directory.
  2. Launch :Lspsaga lsp_finder
  3. A message is printed: [LspSaga] get root dir failed

Expected Behavior

Even if there's no root it should work, as trouble do (it finds references if i launch :Trouble lsp_references)

Details

Reproduce
  1. Install a language server, e.g. clangd
  2. Create a simple cpp file in an empty folder (not git managed, because it must run in single file mode)
  3. Launch :Lspsaga lsp_finder
  4. A message is printed: [LspSaga] get root dir failed

To make sure it runs in single file mode run :LspInfo and you should get an output like this (see root directory):
clangd-singlefile

Environment
  • nvim --version output:
NVIM v0.6.0
Build type: Release
LuaJIT 2.0.5
  • Operating system: gnu/linux
  • lspsaga commit: 518c12e

`client.resolved_capabilities` is deprecated

Message from neovim LSP:

[LSP] Accessing client.resolved_capabilities is deprecated, update your plugins or configuration to access client.server_capabilities instead.The new key/value pairs in server_capabilities directly match those defined in the language server
 protocol

Usage from lspsaga.nvim:

lua/lspsaga/api.lua
37:    and type(client.resolved_capabilities.code_action) == "table"
38:    and client.resolved_capabilities.code_action.resolveProvider

lua/lspsaga/signaturehelp.lua
19:    if client.resolved_capabilities.signature_help == true then

lua/lspsaga/codeaction/indicator.lua
79:          client.resolved_capabilities.code_action

`Lspsaga hover_doc` displays weird `\`s

Description

Lspsaga's hover doc command doesn't escape some characters properly.

Expected Behavior

It escapes the characters properly.

Actual Behavior

As you can see lot of \ are present in the hover doc. This is a screenshot of :Lspsaga hover_doc

Neovim Built in Behavior

This is vim.lsp.buf.hover(), it escapes the characters properly.

Details

Reproduce
  1. Open a python file with Pyright LSP for example
  2. Compare the doc shown between Lspsaga hover_doc and vim.lsp.buf.hover()
Environment

No preview with lsp_finder

Description

Same bug as nvimdev/lspsaga.nvim#182 - no preview with lsp_finder

Expected Behavior
show the preview window to the side

Actual Behavior
preview window doesn't exist

Neovim Built in Behavior
hmmm

Details

default config with any server and open lsp_finder

  • nvim --version output:
NVIM v0.7.0-dev+660-gd3585e0ec
Build type: Release
LuaJIT 2.1.0-beta3
  • Operating system: Mac OS Monterey
  • lspsaga commit: Latest version

Update the documentation on the diagnostics

Description

Currently lsp_jump_diagnostic_prev and lsp_jump_diagnostic_next is no longer available anymore.
I am thinking if we either add that back or update the wiki to reflect that.

As I realise that require"lspsaga.diagnostic".navigate function is not advertised.

Lspsaga hover_doc dont work

Calling :Lspsaga hover_doc does not work.

Before I was using rinx's fork and it was working, but then I switched to this fork.

I'm sorry if it's a known issue... It would be nice to have a issue or something tracking what is working and what is not

My nvim version is v0.6.0-dev, built from source.

Counter in actions window re-counts from 1 for each different language server

Description

Hi, thanks for the amazing work you're doing on this fantastic plugins. I'm quite new to LSP in general (been on the COC.nvim side fo things for years). After switching from glepnir's and rinx's versions of this plugin to yours I started noticing a weird little error.

When opening the code-actions for a Typescript file (with the intention to import a module for undefined variable) the "counter" counts from 1 to 6 for the first items and 1-5 for the rest of the items and not just 1-11. when selecting anything from the second iteration it performs the action of the first iteration:

Screenshot 2021-12-02 at 15 59 54

Screenshot 2021-12-02 at 16 00 18

Screenshot 2021-12-02 at 16 00 52

It looks like the first iteration from 1-6 are ESLINT errors from the ESLINT "server" while the last 5 errors are errors from "tsserver"

Fun effect:
If I fix my first eslint error (by using the assigned object) and bring my eslint-errors down then:

Screenshot 2021-12-02 at 16 05 50

Then it executes the first action from the second iteration (which is technically number 4 on the list):

image

Expected Behavior
Expect "code_action" overview to count from 1 to 11 (or 1 to 7 in the second case) and to perform the correct correcting action

Actual Behavior
Numbering is reset for each new linter/server

Neovim Built in Behavior
lua vim.lsp.buf.code_action():
image

Details

Reproduce
" ############################################################################
" Config: lspconfig
" lspconfig mediates our commands, completion and what not with NVIM's native
" LSP

lua << EOF
local lspconfig = require('lspconfig')
local lsp_installer = require "nvim-lsp-installer"

-- Disable the annoying inline-error text at the end of rows with Ws or Es
vim.diagnostic.config({virtual_text = false})

-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = 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

  -- Enable completion triggered by <c-x><c-o>
  buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')

  -- Mappings.
  local noopts = {}
  local opts = { noremap=true, silent=true }

  -- Fancy lspsaga things
  buf_set_keymap("n", "gh", "<cmd>Lspsaga lsp_finder<cr>", noopts)
  buf_set_keymap("n", "gr", "<cmd>Lspsaga rename<cr>", opts)
  buf_set_keymap("n", "gX", "<cmd>Lspsaga code_action<cr>", opts)
  buf_set_keymap("x", "gX", ":<c-u>Lspsaga range_code_action<cr>", opts)
  buf_set_keymap("n", "K",  "<cmd>Lspsaga hover_doc<cr>", opts)
  buf_set_keymap("n", "go", "<cmd>Lspsaga show_line_diagnostics<cr>", opts)
  buf_set_keymap("n", "gj", "<cmd>Lspsaga diagnostic_jump_next<cr>", opts)
  buf_set_keymap("n", "gk", "<cmd>Lspsaga diagnostic_jump_prev<cr>", opts)
  buf_set_keymap("n", "<C-u>", "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<cr>", noopts)
  buf_set_keymap("n", "<C-d>", "<cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<cr>", noopts)
  -- non-fancy things
  buf_set_keymap('n', 'gx', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
  buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end

-- Map Generic servers
local servers = { 'pyright', 'rust_analyzer' }
for _, lsp in ipairs(servers) do
  lspconfig[lsp].setup {
    on_attach = on_attach,
    flags = {
      debounce_text_changes = 150,
    }
  }
end

-- Set LSP Installer settings
lsp_installer.settings({
    ui = {
        icons = {
            server_installed = "✓",
            server_pending = "➜",
            server_uninstalled = "✗"
        }
    }
})

-- Map and setup individual servers (that have been dynamically downloaeded with
-- lsp installer
lsp_installer.on_server_ready(function (server)
    local opts = {
        on_attach = on_attach,
    }

    if server.name == "eslint" then
        opts.on_attach = function (client, bufnr)
            client.resolved_capabilities.document_formatting = true
            -- on_attach(client, bufnr)
        end
        opts.settings = {
            format = { enable = true }, -- this will enable formatting
        }
    end

    if server.name == 'tsserver' then
        opts.on_attach = function (client, bufnr)
            client.resolved_capabilities.document_formatting = false
            on_attach(client, bufnr)
        end

    end

    server:setup(opts)
end)
EOF
  • LspInstaller tsserver
  • LspInstaller eslint
  • Create new .ts file with some export
  • Create some other ts file that references that import (without importing)
  • call for ":Lspsaga code_action"
  • double counting
Environment
  • nvim --version output: NVIM v0.7.0-dev+662-g73b35ef10
  • Operating system: MacOS Monterey 12.01
  • lspsaga commit: 518c12e

A different icon if code action is available

It's not possible to distinguish between a error and a error with an available code action

Some kind of an additional icon or a different icon when code action is available will be sweet.

Consider make hover_doc window jumpable

Is your feature request related to a problem? Please describe.
The default behavior of vim.lsp.buf.hover() is that the second calling will jump to the preview window. Maybe it's also an acceptable
idea for lspsaga?

Describe the solution you'd like
A slight modification of the following function can be a solution. Actually, this function already has the logic for jumping back to
the main window, however lacking the ability to jump into it.

https://github.com/tami5/lspsaga.nvim/blob/d8073a0e4d19d71da900fb77dcc5f23d72bb8707/lua/lspsaga/hover.lua#L8-L18

Describe alternatives you've considered
An additional config term for focusable is also deserved consideration.

Diagnostic shows errors incorrectly

Description

When use the feature for show diagnostic for current line, the dialog show error, but the error is from another file in the same line

lspsaga_error

I thought it was because of darts, but it happened in others languages: Ruby, Python and Javascript

Details

Go to a file with a error identified by a lsp and go to a file without the error, and in the same line of error, use the command: Lspsaga show_line_diagnostics

  • nvim --version: 0.6.1
  • Operating system: Arch Linux
  • lspsaga branch: nvim6.0

attempt to call field '_get_floating_severity_highlight_name' (a nil value)

Description

When trying to move to next/prev error I get attempt to call field '_get_floating_severity_highlight_name' (a nil value)

Expected Behavior

Move between diagnostics without issues

Actual Behavior

 ...lspsaga/diagnostic.lua:86: attempt to call field '_get_floating_severity_highlight_name' (a nil value)

Neovim Built in Behavior

Details

Environment
  • nvim --version output: NVIM v0.6.0-dev+1865-g3beea1fe1
  • Operating system: macos
  • lspsaga commit: last

Transparent background

Is your feature request related to a problem? Please describe.
My neovim setup has a transparent background and its kinda annoying when i see something like this:
image

Describe the solution you'd like
something like this in the config:

lspsaga.setup {
  transparentBg = true
}

Describe alternatives you've considered

lspsaga.setup {
  bgColor = "#00000000"
}

Support Emoji 😀,Please 🙏

like this:

error_sign = '🤡 ',
warn_sign = '🥶 ',
hint_sign = '😱 ',
infor_sign = ' ',
diagnostic_header_icon ='🐞',

ToggleFloaterm

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I would like a simple way to toggle the floating terminal
There is allready a
:Lspsaga open_floaterm
and
:Lspsaga close_floaterm
i would love something like:
:Lspsaga toggle_floaterm
that would just open a floating terminal if its not allready open and close it if it is open.

Error when preview definition

Description

LspSaga preview_definition() not correct working

Expected Behavior

  • See preview_defination

Actual Behavior

  • Error message
    image

** Neovim version **
v0.6.0-dev

** Branch use **
Main

method textDocument/codeAction is not supported

Description

After merging #65, I noticed some buffers error our repeatedly:

Error detected while processing CursorHold Autocommands for "*":
method textDocument/codeAction is not supported by any of the servers registered for the current buffer

After checking resolved_capabilities, It returns true for code_action. Not sure if this is a server issue, in my case It is rnix-lsp or something we need to take care of

Expected Behavior

short circuit if client doesn't support code actions

Actual Behavior

api.code_action_request is being called

Neovim Built in Behavior

calling vim.lsp.buf.code_action() gives back same error

Solution

Tried wrapping api.code_action_request with pcall but still same error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.