neovim before nixvim

Signed-off-by: Michael Thomson <michael@michaelthomson.dev>
This commit is contained in:
2024-11-13 14:11:33 -05:00
parent 1f361e80f6
commit 67be496482
12 changed files with 74 additions and 106 deletions

View File

@@ -8,7 +8,7 @@
luajit
lua-language-server
nil
(nerdfonts.override { fonts = [ "Iosevka" ]; })
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
];
programs.neovim = {

View File

@@ -1,9 +1,16 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {
-- heading = {
-- position = 'inline',
-- },
sign = {
enabled = false,
},
},
}

View File

@@ -3,31 +3,12 @@ return {
'nvim-treesitter/nvim-treesitter',
config = function()
require('nvim-treesitter.configs').setup({
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
auto_install = true,
-- indent module
indent = { enable = true },
-- highlight module
highlight = { enable = true },
-- auto close tags in html/jsx/tsx
autotag = { enable = true },
incremental_selection = {
enable = false,
keymaps = {
init_selection = '<CR>',
scope_incremental = '<CR>',
node_incremental = '<TAB>',
node_decremental = '<S-TAB>',
},
},
-- text object selection
textobjects = {
select = {
@@ -70,6 +51,17 @@ return {
},
},
})
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
function _G.MyFoldText()
local line = vim.fn.getline(vim.v.foldstart)
return line .. " 󱞣"
end
vim.opt.foldtext = 'v:lua.MyFoldText()'
vim.opt.fillchars:append(',fold: ')
vim.opt.foldlevel = 99;
end
},
{

View File

@@ -0,0 +1,8 @@
return {
"folke/zen-mode.nvim",
opts = {
window = {
width = 80,
},
},
}

View File

@@ -1,23 +0,0 @@
return {
"zk-org/zk-nvim",
config = function()
require("zk").setup({
picker = "minipick",
})
local opts = { noremap=true, silent=false }
-- Create a new note after asking for its title.
vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zd", "<Cmd>ZkNew { dir = \"journal/daily\" }<CR>", opts)
-- Open notes.
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
-- Open notes associated with the selected tags.
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
-- Search for the notes matching a given query.
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
-- Search for the notes matching the current visual selection.
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
end
}