林心如女儿收到百万出生礼 盘点娱乐圈幸福小公举
百度 希望大家把履职思路和重点统一到新时代中国特色社会主义战略部署上来,在服务大局中找准履职尽责的切入点,围绕打好防范化解重大风险、精准脱贫、污染防治的攻坚战,深入一线开展调查研究,提出真知灼见,为中共中央决策提出参考。
Language Server Protocol is used between an editor or IDE (such as Vim or NeoVim) and a language server (such as clangd or many others) that provides language features like auto complete, go to definition, find all references etc.
184 questions
11
votes
6
answers
39k
views
How to configure neovim to properly format python code?
I have neovim 0.8.0 installed.
I have neovim/nvim-lspconfig plugin installed.
I have installed pyright language server on my system (pip install pyright)
I have configured neovim to use the pyright ...
9
votes
3
answers
6k
views
How do I close a hover'ed window with LSP information, Escape does not work?
Whenever I open a hover window with my LSP plugin,
:lua vim.lsp.buf.hover()
I get a floating window hovered over text, but then I can not close it? I've tried ESC and the like. How do you close these ...
9
votes
1
answer
276
views
How does NeoVim's native LSP client compare with plug-ins that implement that protocol?
NeoVim v0.5 will include a native LSP (Language Server Protocol) implementation.
See Greg Hurrell (wincent)'s Screencast #87: Neovim's built-in LSP client covering it.
How does it compare with ...
8
votes
3
answers
4k
views
How can I copy the contents of an LSP / linter error message in Neovim?
I'm using TSServer with LSPConfig to provide in-line typechecking with Neovim.
Is there a way for me to grab the value of a given type error message?
Especially to my system clipboard?
6
votes
3
answers
13k
views
User borders around LSP floating windows
In neovim, these keymaps (from nvim-lspconfig) show diagnostics from LSP servers on a floating window:
vim.keymap.set('n', '<leader>le', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d',...
6
votes
2
answers
2k
views
Is there a way to write a file and skip the autocmd on write?
My .vimrc has,
autocmd FileType rust autocmd BufWritePre <buffer> call LanguageClient#textDocument_formatting_sync()
This works great, unless my LanguageClient crashes. Then I can't write the ...
6
votes
1
answer
3k
views
How to disable semantic highlighting for certain filetypes only?
Using Neovim's native LSP interface, I noticed that semantic highlighting provided by LSP makes things worse for certain languages, so I want to disable it based on filetype.
I know about possibility ...
5
votes
1
answer
15k
views
Where to find debug logs for an LSP started with vim.lsp.start()?
Long time vim user, I am getting started with using LSPs in nvim. I want to use the clangd LSP to get all those powerful LSP goodies.
I am seeing a bunch of spurious errors whenever I edit a file, so ...
5
votes
1
answer
2k
views
Why am I missing the LSP mappings gra, grn, grr and CTRL-S that neovim LSP is supposed to create automatically?
According to the documentation on `:h lsp-quickstart :
Some keymaps are created unconditionally when Nvim starts:
grn is mapped in Normal mode to vim.lsp.buf.rename()
gra is mapped in Normal and ...
5
votes
1
answer
626
views
Pyright LSP flagging errors in class using pandas method
Using the following code example:
import pandas as pd
from typing import Dict
class Test:
def __init__(self, df : pd.DataFrame) -> None:
self.df = df
def example(self, replacements ...
5
votes
0
answers
4k
views
How to disable a lsp server using a specific rule?
I'm on a vue project, and I installed both tsserver and volar, but both of them will be called up when I open a *.ts | *.js file.
But for vue project I only want to use volar since both tsserver and ...
5
votes
1
answer
3k
views
How do I perform a code action on a visual range in Neovim 0.9?
In Neovim 0.8, I had the following command mapped
vnoremap <leader>a :lua vim.lsp.buf.range_code_action()<cr>
which in visual mode, gave me options such as Wrap In Try-Catch/Extract Method ...
4
votes
2
answers
2k
views
Angularls root directory not found
I have the angular language server installed but client doesn't attach when I'm in an angular project because it doesn't have an angular.json in the root (since it is an Nx workspace), which (...
4
votes
1
answer
3k
views
How to select a function in Neovim using LSP?
I want to select (e.g. to comment/uncomment) entire functions at a time in Neovim using the built-in LSP. I do this now by avoiding empty lines in functions so that I can vap to select the entire ...
4
votes
1
answer
1k
views
enable `update_in_insert` only for certain extensions
I have several LSP servers I use in neovim with nvim-lspconfig. Some are fast, and most are slow. I can make the diagnostics update while in insert mode by doing something like
vim.lsp.handlers['...