Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neovim 0.7.0 duplicates clang #171

Open
chriztheanvill opened this issue Apr 18, 2022 · 5 comments
Open

neovim 0.7.0 duplicates clang #171

chriztheanvill opened this issue Apr 18, 2022 · 5 comments

Comments

@chriztheanvill
Copy link

Hi.
With the new neovim 0.7.0, duplicates clang:

clangd =  {
 	cmd = {
 		"clangd",
 		-- "clangd",
 		"--background-index",
 		"--pch-storage=memory",
 		"--clang-tidy",
 		"--completion-style=detailed",
 		-- "--suggest-missing-includes",
 		"--all-scopes-completion",
 		"--cross-file-rename",
 		--"--log=verbose",
 		"--pretty",
 		"--header-insertion=never",
 		"--query-driver=/usr/include/*",
 		"-j=2",
 		"--enable-config"
 	},
 	filetypes = { "c", "cpp" },

 	on_attach = on_attach,
 	capabilities = capabilities,
 }
@ray-x
Copy link
Owner

ray-x commented Apr 18, 2022

the clangd cmd setup :

    cmd = {
      'clangd',
      '--background-index',
      '--suggest-missing-includes',
      '--clang-tidy',
      '--header-insertion=iwyu',
      '--clang-tidy-checks=-*,llvm-*,clang-analyzer-*',
      '--cross-file-rename',
    },

I do not see clangd used twice.

@chriztheanvill
Copy link
Author

Try check the :lspInfo

ray-x added a commit that referenced this issue May 21, 2022
ray-x added a commit that referenced this issue Jul 13, 2022
ray-x added a commit that referenced this issue Jul 16, 2022
* issue #171 multiple lsp server started

* neovim 0.6.1
@ray-x
Copy link
Owner

ray-x commented Jul 19, 2022

@chriztheanvill
Could you check if it works for you?
Looks good to me
image

@chriztheanvill
Copy link
Author

Thank you, it helps, but the new version has complains with the key mapping :D

--- This is my config.
keymaps = {
		{ key = "<leader>lr", func = "require('navigator.reference').reference()" },
		{ mode = "i", key = "<M-k>", func = "signature_help()" },
		{ key = "<A-k>", func = "signature_help()" },
		{ key = "<leader>ly", func = "require('navigator.symbols').document_symbols()" },
		{ key = "<leader>lY", func = "workspace_symbol()" },
		{ key = "<c-]>", func = "require('navigator.definition').definition()" },
		{ key = "<leader>ld", func = "declaration({ border = 'rounded', max_width = 80 })" },
		{ key = "<leader>lp", func = "require('navigator.definition').definition_preview()" },
		{ key = "<leader>lT", func = "require('navigator.treesitter').buf_ts()" },
		{ key = "<Leader>lt", func = "require('navigator.treesitter').bufs_ts()" },
		{ key = "K", func = "hover({ popup_opts = { border = single, max_width = 80 }})" },
		{ key = "<leader>lca", mode = "n", func = "require('navigator.codeAction').code_action()" },
		{ key = "<leader>lcA", mode = "v", func = "range_code_action()" },
		{ key = "<Leader>lRe", func = "rename()" },
		{ key = "<leader>lRn", func = "require('navigator.rename').rename()" },
		{ key = "<Leader>lCi", func = "incoming_calls()" },
		{ key = "<Leader>lCo", func = "outgoing_calls()" },
		{ key = "<leader>li", func = "implementation()" },
		{ key = "<leader>lD", func = "type_definition()" },
		{ key = "<leader>ll", func = "require('navigator.diagnostics').show_diagnostics()" },
		{ key = "<leader>lG", func = "require('navigator.diagnostics').show_buf_diagnostics()" },
		{ key = "]d", func = "diagnostic.goto_next({ border = 'rounded', max_width = 80})" },
		{ key = "[d", func = "diagnostic.goto_prev({ border = 'rounded', max_width = 80})" },
		{ key = "]r", func = "require('navigator.treesitter').goto_next_usage()" },
		{ key = "[r", func = "require('navigator.treesitter').goto_previous_usage()" },
		{ key = "<leader>lf", func = "definition()" },
		-- {key = "g<LeftMouse>", func = "implementation()"},
		{ key = "<Leader>lk", func = "require('navigator.dochighlight').hi_symbol()" },
		{ key = '<leader>lWa', func = 'add_workspace_folder()' },
		{ key = '<leader>lWr', func = 'remove_workspace_folder()' },
		{ key = '<leader>lFf', func = 'formatting()', mode = 'n' },
		{ key = '<leader>lFf', func = 'range_formatting()', mode = 'v' },
		{ key = '<leader>lWl', func = 'print(vim.inspect(vim.lsp.buf.list_workspace_folders()))' },
		{ key = "<leader>lcr", mode = "n", func = "require('navigator.codelens').run_action()" },
	}, 

@ray-x
Copy link
Owner

ray-x commented Jul 19, 2022

it quit unfortunate that there is a breaking change
You have to use this to override the mappings:

  { key = '<Leader>gr', func = require('navigator.reference').reference, desc = 'reference' }, 

It was metioned here: #1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants