neovim

Personal neovim configuration files
git clone git://gtms.dev/neovim
Log | Files | Refs

commit 1c1c3b6e89bb9715a4b0ed264fc1339e1cfaa9c7
parent 1add28b659a2460c8534720541d9dd62787711e8
Author: Tomas Nemec <owl@gtms.dev>
Date:   Mon,  2 Dec 2024 21:57:18 +0100

update

Diffstat:
Mafter/plugin/mini-ai.lua | 6+++++-
Mlua/tms/ft/dart/package.lua | 4++--
Aplugin/exrc.lua | 25+++++++++++++++++++++++++
3 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/after/plugin/mini-ai.lua b/after/plugin/mini-ai.lua @@ -10,7 +10,11 @@ require 'mini.ai'.setup { o = gen_spec.treesitter { a = { '@conditional.outer', '@loop.outer' }, i = { '@conditional.inner', '@loop.inner' }, - } + }, + m = gen_spec.treesitter { + a = '@identifier', + i = '@identifier', + }, }, silent = true, } diff --git a/lua/tms/ft/dart/package.lua b/lua/tms/ft/dart/package.lua @@ -24,7 +24,7 @@ function M.config() end return json end - vim.notify('cannot find package_config.json file', vim.log.levels.ERROR) + -- vim.notify('cannot find package_config.json file', vim.log.levels.ERROR) return nil end @@ -35,7 +35,7 @@ function M.packages() end if config.configVersion ~= 2 then - vim.notify('unsupported version of package_config.json', vim.log.levels.ERROR) + -- vim.notify('unsupported version of package_config.json', vim.log.levels.ERROR) return nil end diff --git a/plugin/exrc.lua b/plugin/exrc.lua @@ -0,0 +1,25 @@ +-- TODO: Should be builtin but not working + +local function source_exrc() + -- if vim.fs.find('.nvim.lua', { type = 'file', })[1] then + if vim.fn.filereadable('.nvim.lua') == 1 then + vim.cmd.source '.nvim.lua' + end +end + +vim.api.nvim_create_autocmd('DirChanged', { + pattern = 'global', + callback = function() + source_exrc() + end, +}) + +if vim.v.vim_did_enter == 1 then + source_exrc() +else + vim.api.nvim_create_autocmd('VimEnter', { + callback = function() + source_exrc() + end + }) +end