diff .chezmoitemplates/init.lua @ 713:45c34cfecc3e

feat: enable full neodev options in chezmoi folder
author zegervdv <zegervdv@me.com>
date Sun, 27 Nov 2022 09:15:27 +0100
parents 679c3a5464d7
children 587765960227
line wrap: on
line diff
--- 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',
         },