Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ require('lazy').setup({
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },

-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{ 'folke/neodev.nvim', opts = {} },
{ 'folke/lazydev.nvim', ft = 'lua', opts = {} },
Copy link
Contributor

@rmacklin rmacklin Jun 20, 2024

Choose a reason for hiding this comment

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

To avoid an "undefined field fs_stat" LSP error on

if not vim.uv.fs_stat(lazypath) then

perhaps this should use the configuration suggested in https://github.com/folke/lazydev.nvim/tree/6184ebbbc8045d70077659b7d30c705a588dc62f#-installation

Suggested change
{ 'folke/lazydev.nvim', ft = 'lua', opts = {} },
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got the sense that these are optional configs for those who want specific vim.uv LSP typings. Not everyone will need/want them. However, if there's no downside and or most people need them, I see no problem with it.

At the risk of bloat perhaps someone else can chime in?

Copy link

@gustavosinacio gustavosinacio Jun 20, 2024

Choose a reason for hiding this comment

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

I feel like, for a kickstart config, the suggested would be the preferred aproach. Anyone who doens't want this will propably be more aware of how to remove it.

Copy link
Contributor

@rmacklin rmacklin Jun 20, 2024

Choose a reason for hiding this comment

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

As it stands, on master using folke/neodev.nvim we don't see an "undefined field fs_stat" LSP error. But with the change in this PR, we do see that error (unless we apply the suggestion above). That's why I think we might want to follow the configuration suggested in https://github.com/folke/lazydev.nvim/tree/6184ebbbc8045d70077659b7d30c705a588dc62f#-installation - Otherwise, merging this PR as-is will leave the fresh kickstart.nvim installation with an LSP error in init.lua, which IMO degrades the desired "first timer" experience.

},
config = function()
-- Brief aside: **What is LSP?**
Expand Down