comparison .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
comparison
equal deleted inserted replaced
712:0b2e711978d4 713:45c34cfecc3e
26 return 'zegervdv/' .. name 26 return 'zegervdv/' .. name
27 end 27 end
28 end 28 end
29 29
30 require('packer').startup { 30 require('packer').startup {
31 function() 31 function(use)
32 use { 'wbthomason/packer.nvim', opt = true } 32 use { 'wbthomason/packer.nvim', opt = true }
33 33
34 -- General plugins 34 -- General plugins
35 use { 'tpope/vim-sensible' } 35 use { 'tpope/vim-sensible' }
36 use { 'tpope/vim-repeat' } 36 use { 'tpope/vim-repeat' }
1172 }, 1172 },
1173 on_attach = on_attach, 1173 on_attach = on_attach,
1174 root_dir = require('null-ls.utils').root_pattern('.hg', '.git', 'stylua.toml'), 1174 root_dir = require('null-ls.utils').root_pattern('.hg', '.git', 'stylua.toml'),
1175 } 1175 }
1176 1176
1177 require('neodev').setup {} 1177 require('neodev').setup {
1178 override = function(root_dir, options)
1179 if require('neodev.util').has_file(root_dir, '~/.local/share/chezmoi') then
1180 options.enabled = true
1181 options.runtime = true
1182 options.types = true
1183 options.plugins = true
1184 end
1185 end,
1186 }
1178 lsp.sumneko_lua.setup { 1187 lsp.sumneko_lua.setup {
1179 lspconfig = { 1188 lspconfig = {
1180 cmd = { 'lua-language-server' }, 1189 cmd = { 'lua-language-server' },
1181 on_attach = on_attach, 1190 on_attach = on_attach,
1182 capabilities = capabilities, 1191 capabilities = capabilities,
1183 settings = { 1192 settings = {
1184 Lua = { 1193 Lua = {
1185 diagnostics = {
1186 globals = { 'use' },
1187 },
1188 completion = { 1194 completion = {
1189 callSnippet = 'Replace', 1195 callSnippet = 'Replace',
1190 }, 1196 },
1191 }, 1197 },
1192 }, 1198 },