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

feature: just get the LSP server settings #168

Open
1 task done
HiPhish opened this issue Nov 5, 2023 · 0 comments
Open
1 task done

feature: just get the LSP server settings #168

HiPhish opened this issue Nov 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@HiPhish
Copy link

HiPhish commented Nov 5, 2023

Did you check the docs?

  • I have read all the neodev.nvim docs

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

I have a custom rule-based setup which picks the correct LSP settings based on the project. It is similar to how neodev detects Neovim plugin projects, but also for Love2D and Luarocks projects. Your plugin does too much for my needs, I only want to get the Neovim settings and take over from there instead of having everything set up magically.

Describe the solution you'd like

An API which only returns the LSP server settings but does not perform any side effects. Something I could use like this:

local neodev = require 'neodev'
local lspconfig = require 'lspconfig'

lspconfig.lua_ls.setup {
    settings = neodev.lsp_settings(),  -- This is the new function
}

The lsp_settings function could take a table with personal override settings as argument and merge them with neodev's settings. I don't know if this is feasible though. If not, then keep it as dumb as possible and let the user perform any table merging.

Describe alternatives you've considered

N/A

Additional context

You might be wondering why I need neodev if I already have my own settings. My own settings are only concerned with setting runtime.path and workspace.library, but that's the easy part since it can be automated at startup. There are also function signatures and type definitions for Neovim's own API. I would have to maintain all that by hand (or use some script to scrape that information), and I would rather piggy-back on someone else's work instead.

@HiPhish HiPhish added the enhancement New feature or request label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant