Comments (5)
well, telescope.builtin.oldfiles() already shows me the files edited in chezmoi but opening them and editing doesn't sync the file.
I tried the autocmd in readme.md but couldn't make it to work.
from chezmoi.nvim.
Did you lazy load this plugin?
from chezmoi.nvim.
yes the plugin is loaded.
when i edit via :chezmoiedit
everything works fine but when i edit outside of :chezmoiedit
(for example opening a file directly with nvim nvim "C:\Users\asharaf\.local\share\chezmoi\dot_config\nvim\init.lua"
) then sync won't happen.
this is my config on windows:
return {
"xvzc/chezmoi.nvim",
lazy = false,
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("chezmoi").setup({
-- your configurations
edit = {
watch = true, -- Set true to automatically apply on save.
force = true, -- Set true to force apply. Works only when watch = true.
},
notification = {
on_open = true, -- vim.notify when start editing chezmoi-managed file.
on_apply = true, -- vim.notify on apply.
},
telescope = {
select = { "<CR>" },
},
})
-- Autocmd for Chezmoi
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = { os.getenv("USERPROFILE") .. "/.local/share/chezmoi/*" },
callback = function()
vim.schedule(require("chezmoi.commands.__edit").watch)
end,
})
end,
}
from chezmoi.nvim.
Maybe because your path string contains /
instead of \\
which is the path separator for windows system?
By the way, I need to tell you that it's not throughly tested on windows system.
from chezmoi.nvim.
still doesn't trigger the sync using \ (double back slash)
no problem, i will use :chezmoiedit
for now.
-- Autocmd for Chezmoi
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = { os.getenv("USERPROFILE") .. "\\.local\\share\\chezmoi\\*" },
callback = function()
vim.schedule(require("chezmoi.commands.__edit").watch)
end,
})
from chezmoi.nvim.
Related Issues (10)
- Treat all files in `chezmoi source-path` as Chezmoi files HOT 9
- question about netrw HOT 3
- using telescope HOT 2
- apply on save doesn't work HOT 1
- find_files picker is incompatible with select_tab_drop HOT 10
- Error when running list on new setup. HOT 6
- Chezmoi vim and chezmoi nvim conflict together HOT 5
- Chezmoi script support HOT 3
- Question about `--watch` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezmoi.nvim.