Coder Social home page Coder Social logo

Neovim setup not working about contextive HOT 4 CLOSED

Josh-Piper avatar Josh-Piper commented on July 30, 2024
Neovim setup not working

from contextive.

Comments (4)

Josh-Piper avatar Josh-Piper commented on July 30, 2024 1

Got it working based on the lsp.log.
Neovim did not have access to Mac's /usr/local/bin. I should have just put the binary elsewhere... (your readme states to put it in $HOME so that's my bad).

I was trying to get the intellisense working, that's what I was in insert mode. It's working now
photo-11-10 at 15 42 58@2x

Leaving this here since many might try using a neovim distro. For a simple LazyVim distro config all I needed was

return {
  "neovim/nvim-lspconfig",
  opts = function()
    local lspconfig = require("lspconfig")

    local lspconfig_configs = require("lspconfig.configs")

    lspconfig_configs.contextive = {
      default_config = {
        cmd = { "Contextive.LanguageServer" },
        root_dir = lspconfig.util.root_pattern(".contextive", ".git"),
      },
    }

    lspconfig.contextive.setup({})
  end,
}

from contextive.

chrissimon-au avatar chrissimon-au commented on July 30, 2024

Hi @Josh-Piper, thanks for your report.

The neovim documentation is a pretty recent addition to Contextive thanks to contributions from @erikjuhani - you can see a screenshot of it working in their pull request: #49 so in theory it should work for you.

Unfortunately I don't have a replication environment setup myself just yet.

One thing to check - I'm not sure the hover appears by default as you're typing - according to https://neovim.io/doc/user/lsp.html#lsp-config a number of keymaps are setup by default (unless you have overwritten them) and by default K is bound to the hover function.

Could you give that a try? I suspect you have to not be in insert mode...

If that doesn't work, I note from the screenshot above it says that the languageclient log is in .local/state/nvim/lsp.log - could you check what's in there?

If still no luck, I wonder if @erikjuhani, would be so kind as to take a look at the above and see if anything jumps out?

Thanks!
Chris

from contextive.

chrissimon-au avatar chrissimon-au commented on July 30, 2024

Thanks @Josh-Piper, glad you got it sorted!

In other vim world updates, @erikjuhani has prepped a contribution to nvm-lspconfig - neovim/nvim-lspconfig@master...erikjuhani:nvim-lspconfig:feat/contextive-language-server - I think he's waiting on my review before merging it, and I'm waiting until I've resolved an issue with contextive's config approach in case it affects the configuration (see #55 and possibly #54).

While the neovim config works fine with the default definitions.yml file location, it doesn't yet work if you try and leverage the contextive.path setting to change the location.

Thanks also for the LazyVim contribution - I'll update the main readme docs to include it shortly 🙂

from contextive.

erikjuhani avatar erikjuhani commented on July 30, 2024

Hey! I’m glad you got it sorted out! I’ve been working on to add the neovim configuration to nvim lsp-config like @chrissimon-au mentioned! I’ve been extremely busy with work recently so my work in this regard has slowed down to a halt. I was planning on revisiting the work this weekend.

After the changes you would not have to install the LSP manually, but use mason to provide it for you! Mason is already included with LazyVim.

from contextive.

Related Issues (20)

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.