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

feat: inlay hints #38

Merged
merged 19 commits into from
Jul 31, 2024
Merged

feat: inlay hints #38

merged 19 commits into from
Jul 31, 2024

Conversation

tris203
Copy link
Owner

@tris203 tris203 commented May 24, 2024

Needs:

Closes #37

lua/precognition/init.lua Outdated Show resolved Hide resolved
@tris203 tris203 marked this pull request as ready for review May 29, 2024 16:33
@tris203 tris203 requested a review from willothy May 29, 2024 16:33
@tris203
Copy link
Owner Author

tris203 commented May 29, 2024

@willothy can you give this one a look over as there is a lot here

i think its good to go though

@willothy
Copy link
Collaborator

I'll look this over tomorrow!

Copy link
Collaborator

@willothy willothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a few small edits. I might be wrong about the has() thing if the inlay_hint API is different between 0.10 and 0.11.

local M = {}

function M.inlay_hints_enabled(t)
if vim.lsp and vim.lsp.inlay_hint and vim.lsp.inlay_hint.is_enabled then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you use has("nvim-0.10") here?

Copy link
Collaborator

@willothy willothy May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't a big deal then this PR is good to merge once conflicts are handled imo :)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to rebase and will check the field name. I know the lsp API changed a few times in 0.10. I can't remember which released

I will check docs tomorrow

lua/precognition/utils.lua Outdated Show resolved Hide resolved
@tris203 tris203 added this to the 1.1.0 milestone Jun 1, 2024
@tris203 tris203 merged commit 6772d3a into main Jul 31, 2024
10 checks passed
@m4xshen m4xshen mentioned this pull request Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any way to make it adjust to inlay hints
2 participants