https://github.com/czfadmin/readonly.nvim
The file you open is in read-only mode, so it won't be accidentally modified, similar to the file read-only function in VSCODE
https://github.com/czfadmin/readonly.nvim
Last synced: 1 day ago
JSON representation
The file you open is in read-only mode, so it won't be accidentally modified, similar to the file read-only function in VSCODE
- Host: GitHub
- URL: https://github.com/czfadmin/readonly.nvim
- Owner: czfadmin
- License: mit
- Created: 2025-02-21T03:22:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-27T14:02:57.000Z (about 1 year ago)
- Last Synced: 2025-04-27T15:19:43.983Z (about 1 year ago)
- Language: Lua
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Readonly.nvim
The file you open is in read-only mode, so it won't be accidentally modified, similar to the file read-only function in VSCODE
## HOW TO USE IT?
- lazyvim
```lua
return {
"czfadmin/readonly.nvim",
event = "BufReadPre",
enabled = true,
opts = {
restricted_directories = {
"/etc",
"/usr",
"/var",
"/tmp",
"/opt",
"*/node_modules/.*"
},
exclude_directories = {},
},
config = function(_, opts)
require("readonly").setup(opts)
end,
}
```