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

fix(deprecation): remove use of deprecated API functions #59

Merged
merged 3 commits into from
Jul 6, 2024

Conversation

willothy
Copy link
Contributor

@willothy willothy commented Jun 2, 2024

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

@willothy willothy changed the title refactor: remove use of deprecated API functions 0.10: remove use of deprecated API functions Jun 2, 2024
Copy link
Contributor

github-actions bot commented Jul 6, 2024

This PR is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the stale label Jul 6, 2024
@folke folke changed the title 0.10: remove use of deprecated API functions fix(deprecation): remove use of deprecated API functions Jul 6, 2024
@folke folke merged commit 983a93b into folke:main Jul 6, 2024
9 checks passed
@folke
Copy link
Owner

folke commented Jul 6, 2024

Fixed it to work on version < 0.10.0 and added Util.islist back since that was still used and needed for older NEovim versions.

ty!

@folke
Copy link
Owner

folke commented Jul 6, 2024

Also fixed that flatten usage. Didn't work...

@willothy
Copy link
Contributor Author

willothy commented Jul 6, 2024

Also fixed that flatten usage. Didn't work...

Hmm I'll have to look into that one then! Afaik the docs say that vim.iter(t):flatten() should be able to replace vim.tbl_flatten, but maybe there are some slight differences. Also maybe between versions as I've been using this branch for a bit with no issues.

Thanks for the merge and for all of your work :)

folke pushed a commit that referenced this pull request Jul 7, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](v1.2.2...v1.3.0)
(2024-07-07)


### Features

* added support for ruff_lsp. Fixes
[#45](#45)
([a198a8c](a198a8c))
* **util:** util.pick_root_dir
([197c17a](197c17a))


### Bug Fixes

* **build:** fix schema generation issues
([#63](#63))
([45484f5](45484f5)),
closes [#52](#52)
[#60](#60)
* **commands:** checkhealth. Fixes
[#29](#29)
([245bb87](245bb87))
* deprecation warnings on 0.11
([c6e2d96](c6e2d96))
* **deprecation:** remove use of deprecated API functions
([#59](#59))
([983a93b](983a93b))
* flatten
([cdbd1f2](cdbd1f2))
* **health:** remove deprecated API warnings
([#28](#28))
([9625a17](9625a17))
* **health:** remove nvim-treesitter dependency
([#44](#44))
([3374276](3374276))
* **json:** set `null` values to `nil`
([2f131d0](2f131d0))
* **lspconfig:** dont deepcopy the full config. Do settings only
([37a7205](37a7205))
* normalize paths. Fixes
[#33](#33)
([e0835bd](e0835bd))
* remove nickel_ls
([ca5246f](ca5246f))
* **util:** check that root_dir exists. Fixes
[#56](#56). Closes
[#51](#51)
([f9dcd17](f9dcd17))
* **util:** normalize paths returned by `Util.file_patterns`
([#35](#35))
([7c34c86](7c34c86))
* **volar:** volar schema
([#64](#64))
([4274159](4274159))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants