# HG changeset patch # User zegervdv # Date 1669536927 -3600 # Node ID 45c34cfecc3e9176457e980f03a73634fe4d28df # Parent 0b2e711978d48618865c39dffb8aede886b2e7cc feat: enable full neodev options in chezmoi folder diff -r 0b2e711978d4 -r 45c34cfecc3e .chezmoitemplates/init.lua --- a/.chezmoitemplates/init.lua Sun Nov 27 09:14:46 2022 +0100 +++ b/.chezmoitemplates/init.lua Sun Nov 27 09:15:27 2022 +0100 @@ -28,7 +28,7 @@ end require('packer').startup { - function() + function(use) use { 'wbthomason/packer.nvim', opt = true } -- General plugins @@ -1174,7 +1174,16 @@ root_dir = require('null-ls.utils').root_pattern('.hg', '.git', 'stylua.toml'), } -require('neodev').setup {} +require('neodev').setup { + override = function(root_dir, options) + if require('neodev.util').has_file(root_dir, '~/.local/share/chezmoi') then + options.enabled = true + options.runtime = true + options.types = true + options.plugins = true + end + end, +} lsp.sumneko_lua.setup { lspconfig = { cmd = { 'lua-language-server' }, @@ -1182,9 +1191,6 @@ capabilities = capabilities, settings = { Lua = { - diagnostics = { - globals = { 'use' }, - }, completion = { callSnippet = 'Replace', }, diff -r 0b2e711978d4 -r 45c34cfecc3e .luarc.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.luarc.json Sun Nov 27 09:15:27 2022 +0100 @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "Lua.workspace.checkThirdParty": false +} \ No newline at end of file