feat(nixos): migrate system configuration
This commit is contained in:
36
configs/nixos/modules/shell/nvim/config.lua
Normal file
36
configs/nixos/modules/shell/nvim/config.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
-- Imperative configuration that has no typed nixvim option: the colorscheme call and autocmds.
|
||||
|
||||
-- gbprod/nord.nvim.
|
||||
require("nord").setup({
|
||||
transparent = true,
|
||||
})
|
||||
vim.cmd.colorscheme("nord")
|
||||
|
||||
-- Conceal markdown syntax in markdown buffers.
|
||||
-- conceallevel is window-local, so it is set with opt_local when the filetype
|
||||
-- is applied to the buffer's window.
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "markdown",
|
||||
callback = function()
|
||||
vim.opt_local.conceallevel = 2
|
||||
end,
|
||||
})
|
||||
|
||||
-- Soft-wrap prose buffers without inserting line breaks.
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "gitcommit", "markdown", "text" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.linebreak = true
|
||||
vim.opt_local.breakindent = true
|
||||
end,
|
||||
})
|
||||
|
||||
-- Turn line blame off again once the Neogit status buffer is closed.
|
||||
vim.api.nvim_create_autocmd("BufUnload", {
|
||||
callback = function(args)
|
||||
if vim.bo[args.buf].filetype == "NeogitStatus" then
|
||||
require("gitsigns").toggle_current_line_blame(false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
Reference in New Issue
Block a user