Commit Graph

151 Commits

Author SHA1 Message Date
Micah Halter 5cff548d38
fix(lspconfig): add hook before and not after (#92)
## Description
A common use of `on_new_config` is to construct the `cmd` for starting
language servers based on the configuration. These language servers
require that the settings are finalized before it is run. It looks like
previous commits did use `add_hook_before` for the `lspconfig`
integration but it got moved to being `add_hook_after` when centralizing
it with the `lua_ls` and `jsonls` plugin integrations. We should revert
this back to `add_hook_before` so that the existing `on_new_config`
functions continue working.
2025-02-27 08:53:52 +01:00
Chaz 92c1a48a2d
fix(lspconfig): revert `_available_servers` (#108)
## Description

Reverts #105.

[neovim/nvim-lspconfig - PR
#3589](https://github.com/neovim/nvim-lspconfig/pull/3589) reverts
`_available_servers` back to `available_servers`.

## Related Issue(s)

Fixes #107.

## Screenshots

NA
2025-01-28 08:28:05 +01:00
Zhou Fang 9f73ae6aa6
fix(util): update deprecated methods (#106)
## Description

After updating lspconfig, there is an error when I tried to open
`neoconf.json`.

The reason is that `lspconfig.util.available_servers` has been renamed
to `lspconfig.util._available_servers`.
([link](e118ce58da))

I fixed the issue and also update the deprecated code which is also come
from lspconfig.util
([details](0e234f4cad/lua/lspconfig/util.lua (L359-L362)))

<details>
<summary>error detail</summary>

```
  Error  22:01:18 notify.error settings.nvim Failed to run client.before_init for settings/plugins/jsonls
....local/share/nvim/lazy/neoconf.nvim/lua/neoconf/util.lua:36: attempt to call field 'available_servers' (a nil value)

stack traceback:
	...nvim/lazy/neoconf.nvim/lua/neoconf/plugins/lspconfig.lua:14: in function <...nvim/lazy/neoconf.nvim/lua/neoconf/plugins/lspconfig.lua:8>
	...hare/nvim/lazy/neoconf.nvim/lua/neoconf/plugins/init.lua:14: in function 'fire'
	...hare/nvim/lazy/neoconf.nvim/lua/neoconf/plugins/init.lua:20: in function 'fire'
	...ocal/share/nvim/lazy/neoconf.nvim/lua/neoconf/schema.lua:45: in function 'get'
	...re/nvim/lazy/neoconf.nvim/lua/neoconf/plugins/jsonls.lua:22: in function 'on_config'
	....local/share/nvim/lazy/neoconf.nvim/lua/neoconf/util.lua:49: in function <....local/share/nvim/lazy/neoconf.nvim/lua/neoconf/util.lua:48>
	[C]: in function 'func'
	...al/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/util.lua:53: in function <...al/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/util.lua:51>
	[C]: in function 'pcall'
	...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/configs.lua:217: in function 'make_config'
	...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:160: in function 'add'
	...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:220: in function <...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:207>
	[C]: in function 'pcall'
	...l/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/async.lua:5: in function <...l/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/async.lua:4>
 ```

</details>

## Related Issue(s)

## Screenshots

![image](https://github.com/user-attachments/assets/956a59ff-1767-456a-a0bb-6ccf41d8a4bc)
2025-01-22 14:39:55 +01:00
Vincent Law 8f8a0ac9d5
docs(README): config files renamed from .nvim.settings.json to .neoco… (#102)
## Description

The file name in README does not match, since
<762b2f1517>

Co-authored-by: luowentao <luowentao@meituan.com>
2025-01-22 08:52:27 +01:00
leoatchina f25f676e1c
fix(lspconfig): use `_available_servers` in health.lua (#105)
according to
e118ce58da

## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->
fixed _available_servers is nil bug.

## Related Issue(s)
https://github.com/folke/neoconf.nvim/issues/104
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-01-22 08:32:28 +01:00
Emeliov Dmitrii 593fa6b71a
feat(sonarlint): add sonarlint to schemas (#95) 2024-12-16 08:18:25 +01:00
Michael Peter 605cf4f9aa
fix(health): lazydev.nvim instead of neodev.nvim (#96)
## Description

healthcheck checks for neodev.nvim which is archived and replaced by
lazydev.nvim.

## Related Issue(s)


## Screenshots
2024-12-09 09:55:05 +01:00
Abao e901bc61d8
feat(typst): add typst_lsp and tinymist (#93)
## Description

Add two typst language servers: `typst_lsp` and `tinymist`

* [typst_lsp](https://github.com/nvarner/typst-lsp)
* [tinymist](https://github.com/Myriad-Dreamin/tinymist)
2024-10-22 11:10:46 +02:00
heygent 557f3e7535
fix(basedpyright): add basedpyright schema (#90)
Adds [basedpyright](https://github.com/DetachHead/basedpyright) lsp
schema
2024-09-16 08:21:08 +02:00
Micah Halter 559836d2b6
fix(schemas): `tsserver` renamed to `ts_ls` (#89)
## Description

`tsserver` was recently renamed to `ts_ls` in `nvim-lspconfig`. This
resolves that renaming
(https://github.com/neovim/nvim-lspconfig/pull/3232)
2024-09-16 08:20:27 +02:00
Folke Lemaitre 4e8a86dc36
fix: local options. Fixes #81 2024-07-18 17:44:16 +02:00
Folke Lemaitre 7137fde498
fix(util): if lcponfig doesnt return a root dir, then also dont use the fallback. Fixes #74 2024-07-09 17:18:15 +02:00
Folke Lemaitre e0835bdc1a
fix: normalize paths. Fixes #33 2024-07-07 05:41:25 +02:00
Folke Lemaitre 197c17af57
feat(util): util.pick_root_dir 2024-07-07 07:20:30 +02:00
Folke Lemaitre cdbd1f2da8
fix: flatten 2024-07-07 00:28:10 +02:00
Folke Lemaitre a198a8c92e
feat: added support for ruff_lsp. Fixes #45 2024-07-07 00:22:39 +02:00
Folke Lemaitre 245bb871b2
fix(commands): checkhealth. Fixes #29 2024-07-07 00:21:25 +02:00
Michael Ziminsky (Z) 7c34c869e6
fix(util): normalize paths returned by `Util.file_patterns` (#35)
Astronvim errors while loading neoconf with neovim v0.10. The issue
appears to be the same as:
https://github.com/NvChad/NvChad/issues/1832
https://github.com/neovim/neovim/issues/22698

Normalizing the paths eliminates the error, but I haven't done much
testing beyond that.
2024-07-07 00:12:13 +02:00
Amaan Qureshi 3374276df2
fix(health): remove nvim-treesitter dependency (#44)
This does make the neovim requirement for health 0.9.0, but
nvim-treesitter will soon deprecate most of its "plugin" functionality
and solely serve as an installer of parsers, and any plugin
functionality should rely on the upstream `vim.treesitter` module
2024-07-07 00:10:55 +02:00
Folke Lemaitre 16fb6b996d
style: spelling 2024-07-07 00:07:29 +02:00
Folke Lemaitre f9dcd17b95
fix(util): check that root_dir exists. Fixes #56. Closes #51 2024-07-07 00:03:25 +02:00
Will Hopkins 983a93b2b6
fix(deprecation): remove use of deprecated API functions (#59)
Removes usage of several deprecated API functions, and changes all uses
of `vim.loop` to `vim.uv`.

Now that 0.10 is released, several functions used here have been
deprecated and show warnings when they're first called.

I've updated:
- `lsp.get_active_clients()` -> `lsp.get_clients()`
- `api.nvim_buf_set_option` -> `api.nvim_set_option_value` with
buf-local scope
- `api.nvim_win_set_option` -> `api.nvim_set_option_value` with
window-local scope
- `vim.tbl_flatten` -> `vim.iter(t):flatten():totable()`
- `vim.loop.*` -> `vim.uv.*`
- `vim.islist or vim.tbl_islist` -> `vim.islist`

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-07-06 23:58:43 +02:00
Andre Toerien 45484f5b97
fix(build): fix schema generation issues (#63)
This fixes a few issues relating to the CI json schema generation.

- befcc1f452e2226d329b67b0510bd5f2e4a75591 fixes #60, and also fixes
several other servers that previously had an empty `properties` in the
schema. This happened because `c.properties` is a table, which means
`vim.list_extend` doesn't do anything. `properties` should also always
be an object and not an array, so `vim.empty_dict()` is now being used
to prevent outputting `[]` when `properties` is empty.
- 84e19f41b4c0ad6865fdc61f62bae5cff496b71f embeds `index.json` rather
than downloading it every time. As mentioned in #54, the gist is no
longer maintained, so there's no reason to download it anymore. In the
future this should probably be [sourced from
elsewhere](https://gist.github.com/williamboman/a01c3ce1884d4b57cc93422e7eae7702?permalink_comment_id=4689512).
- 2a911fd425dabc54847d61c387fabb4cd572907e fixes the URL for Volar.
- 6dfd503dc5a09a040dab00c2922d4d4e0f9374b5 is just me running the build
step locally. If I shouldn't have done this I'm happy to revert it.

Fixes #52
Fixes #60

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-07-06 23:52:35 +02:00
xiaojianzheng 42741597dd
fix(volar): volar schema (#64)
Co-authored-by: 肖健正 <xiaojianzheng@qq.com>
2024-07-06 22:52:14 +02:00
Folke Lemaitre ba191d88af
style: format 2024-07-05 15:41:26 +02:00
Folke Lemaitre c6e2d969b8
fix: deprecation warnings on 0.11 2024-05-16 21:55:18 +02:00
Folke Lemaitre 2da7d4da76
build: fix broken schemas 2024-01-19 08:54:43 +01:00
Folke Lemaitre 708abbb1f3
ci: dont error when a single schema fails 2023-11-04 10:20:40 +01:00
Folke Lemaitre 86ed5b9192
Revert "Revert "fix(lspconfig): dont deepcopy the full config. Do settings only""
This reverts commit 2609dee882.
2023-09-29 11:10:57 +02:00
Folke Lemaitre 2f131d0e7d
fix(json): set `null` values to `nil` 2023-09-29 11:09:47 +02:00
Folke Lemaitre 2609dee882
Revert "fix(lspconfig): dont deepcopy the full config. Do settings only"
This reverts commit 37a7205282.
2023-09-29 11:09:47 +02:00
Folke Lemaitre 37a7205282
fix(lspconfig): dont deepcopy the full config. Do settings only 2023-09-28 17:07:56 +02:00
Folke Lemaitre ca5246f6d8
fix: remove nickel_ls 2023-08-26 17:00:57 +02:00
J 9625a1710a
fix(health): remove deprecated API warnings (#28) 2023-06-19 16:35:32 +02:00
Folke Lemaitre cfec478a53
fix(init): only check for available servers if lspconfig is loaded 2023-06-19 16:06:43 +02:00
Bryan Forbes ea175a511d
fix(jsonls): use `vim.filetype.add()` to set the filetype for neoconf.json (#25) 2023-04-17 08:23:51 +02:00
Folke Lemaitre 5feed54641
fix(icons): fixed obsolete icons with nerdfix 2023-03-26 12:34:06 +02:00
Folke Lemaitre 9214879f83
feat: better support for root_dir in monorepos. Always return longest. Fixes #14 Fixes #10 2023-03-23 10:30:53 +01:00
Folke Lemaitre 67acada4ed
fix(schema): correctly format uri. Fixes #18 2023-03-16 08:34:29 +01:00
Folke Lemaitre 7297592907
fix(lspconfig): replace backslashes on windows. Fixes #18 2023-03-15 16:22:51 +01:00
Folke Lemaitre 835da21fd7
feat(lspconfig): allow setting the lsp server to false to disable it in your project. Fixes #1 2023-03-08 08:36:26 +01:00
Folke Lemaitre 8b3f2b56e6
fix: lua_ls schema 2023-02-12 11:16:33 +01:00
Folke Lemaitre e3479df94d
fix: temp fix for sumneok_lua -> lua_ls rename 2023-02-12 11:12:18 +01:00
Folke Lemaitre 5231f541ae
refactor: sumneko -> lua_ls 2023-02-12 11:12:18 +01:00
Yuta Katayama 156a3eed89
fix: rename sumneko_lua -> lua_ls (#12) 2023-02-12 11:04:37 +01:00
Folke Lemaitre 274c7700d9
fix: only expand top-level and lspconfig settings. Fixes #11 2023-02-07 23:35:37 +01:00
Folke Lemaitre 4f8916d220
fix(annotations): fixed comment parsing 2023-01-25 09:09:52 +01:00
Folke Lemaitre 52df9fcd2a
fix(health): settings.nvim -> neoconf.nvim 2023-01-22 21:17:58 +01:00
Folke Lemaitre 8a4e1336f1
fix: add types/lua to workspace 2023-01-22 21:17:44 +01:00
Folke Lemaitre 7d00bbffb5
fix: move neoconf settings to `neoconf` in json instead of `settings` 2022-12-14 08:54:19 +01:00