Git Product home page Git Product logo

Comments (6)

pluma9 avatar pluma9 commented on June 1, 2024 1

@Hoffs It works like a charm now. Thanks for pointing that out.

from omnisharp-extended-lsp.nvim.

AdamBremholm avatar AdamBremholm commented on June 1, 2024

had another keymapping pointing to the normal lsp go to definition. Your plugin works fine thank you!

from omnisharp-extended-lsp.nvim.

pluma9 avatar pluma9 commented on June 1, 2024

I got the same error. lua require('omnisharp_extended').lsp_definitions() also works for me.

Hi @AdamBremholm, could you please re-open this issue? The reason is that the README claims that this command is not necessary for neovim nightly, which implies that lua vim.lsp.buf.definition() should work.

from omnisharp-extended-lsp.nvim.

Hoffs avatar Hoffs commented on June 1, 2024

The reason is that the README claims that this command is not necessary for neovim nightly, which implies that lua vim.lsp.buf.definition() should work

Hi @pluma9 , have you set the handler part of the config?

from omnisharp-extended-lsp.nvim.

pluma9 avatar pluma9 commented on June 1, 2024

@Hoffs Yes, I have (I guess this is the reason why I can do lua require('omnisharp_extended').lsp_definitions()). My config:

local pid = vim.fn.getpid()
local omnisharp_bin = "D:\\programs\\omnisharp\\OmniSharp.exe"
local omnisharp_cmd = { omnisharp_bin, "--languageserver", "--hostPID", tostring(pid)}

require'lspconfig'.omnisharp.setup{
	cmd = omnisharp_cmd,
	on_new_config = function(new_config,new_root_dir)
		new_config.cmd = omnisharp_cmd
	end,
	on_attach = on_attach,
	root_dir = function(file, _)
		if file:sub(-#".csx") == ".csx" then
			return util.path.dirname(file)
		end
		return util.root_pattern("*.sln")(file) or util.root_pattern("*.csproj")(file)
	end,
	handler = {
		["textDocument/definition"] = require('omnisharp_extended').handler,
	},
}

from omnisharp-extended-lsp.nvim.

Hoffs avatar Hoffs commented on June 1, 2024

@pluma9 based on your config snippet, you have handler =, but it should be handlers = (see https://neovim.io/doc/user/lsp.html#lsp-handler-configuration , part following if using 'nvim-lspconfig'...). Being able to call lua require('omnisharp_extended').lsp_definitions() just means that plugin itself is installed/available.

from omnisharp-extended-lsp.nvim.

Related Issues (19)

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.