diff options
-rw-r--r-- | vim/kickstarter.lua | 106 |
1 files changed, 96 insertions, 10 deletions
diff --git a/vim/kickstarter.lua b/vim/kickstarter.lua index 304dbd1..620983f 100644 --- a/vim/kickstarter.lua +++ b/vim/kickstarter.lua | |||
@@ -123,11 +123,22 @@ require('lazy').setup({ | |||
123 | -- For surrounding | 123 | -- For surrounding |
124 | 'tpope/vim-surround', | 124 | 'tpope/vim-surround', |
125 | 125 | ||
126 | |||
126 | -- From vim plugin | 127 | -- From vim plugin |
127 | 'junegunn/goyo.vim', | 128 | 'junegunn/goyo.vim', |
128 | 'itchyny/lightline.vim', | 129 | 'itchyny/lightline.vim', |
129 | 'preservim/nerdtree', | 130 | 'preservim/nerdtree', |
130 | 131 | ||
132 | { | ||
133 | -- onedark.nvim: Theme inspired by Atom | ||
134 | 'navarasu/onedark.nvim', | ||
135 | priority = 1000, | ||
136 | config = function() | ||
137 | vim.cmd.colorscheme 'onedark' | ||
138 | -- vim.cmd('source ~/.vim/vim-init/init/init-basic.vim') | ||
139 | end, | ||
140 | }, | ||
141 | |||
131 | -- hop.nvim | 142 | -- hop.nvim |
132 | { | 143 | { |
133 | 'smoka7/hop.nvim', | 144 | 'smoka7/hop.nvim', |
@@ -136,6 +147,57 @@ require('lazy').setup({ | |||
136 | keys = 'etovxqpdygfblzhckisuran' | 147 | keys = 'etovxqpdygfblzhckisuran' |
137 | } | 148 | } |
138 | }, | 149 | }, |
150 | { | ||
151 | "epwalsh/obsidian.nvim", | ||
152 | version = "*", -- recommended, use latest release instead of latest commit | ||
153 | lazy = true, | ||
154 | ft = "markdown", | ||
155 | -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: | ||
156 | -- event = { | ||
157 | -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. | ||
158 | -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" | ||
159 | -- "BufReadPre path/to/my-vault/**.md", | ||
160 | -- "BufNewFile path/to/my-vault/**.md", | ||
161 | -- }, | ||
162 | dependencies = { | ||
163 | -- Required. | ||
164 | "nvim-lua/plenary.nvim", | ||
165 | |||
166 | -- see below for full list of optional dependencies 👇 | ||
167 | }, | ||
168 | opts = { | ||
169 | workspaces = { | ||
170 | { | ||
171 | name = "log", | ||
172 | path = "~/log", | ||
173 | }, | ||
174 | }, | ||
175 | completion = { | ||
176 | -- Set to false to disable completion. | ||
177 | nvim_cmp = true, | ||
178 | -- Trigger completion at 2 chars. | ||
179 | min_chars = 2, | ||
180 | }, | ||
181 | mapping = { | ||
182 | -- Toggle check-boxes. | ||
183 | ["<leader>ch"] = { | ||
184 | action = function() | ||
185 | return require("obsidian").util.toggle_checkbox() | ||
186 | end, | ||
187 | opts = { buffer = true }, | ||
188 | }, | ||
189 | -- Smart action depending on context, either follow link or toggle checkbox. | ||
190 | ["<cr>"] = { | ||
191 | action = function() | ||
192 | return require("obsidian").util.smart_action() | ||
193 | end, | ||
194 | opts = { buffer = true, expr = true }, | ||
195 | } | ||
196 | } | ||
197 | |||
198 | -- see below for full list of options 👇 | ||
199 | }, | ||
200 | }, | ||
139 | 201 | ||
140 | -- NOTE: This is where your plugins related to LSP can be installed. | 202 | -- NOTE: This is where your plugins related to LSP can be installed. |
141 | -- The configuration is done below. Search for lspconfig to find it below. | 203 | -- The configuration is done below. Search for lspconfig to find it below. |
@@ -206,17 +268,18 @@ require('lazy').setup({ | |||
206 | end, | 268 | end, |
207 | }, | 269 | }, |
208 | }, | 270 | }, |
209 | |||
210 | { | 271 | { |
211 | -- Theme inspired by Atom | 272 | 'stevearc/aerial.nvim', |
212 | 'navarasu/onedark.nvim', | 273 | enable = false, |
213 | priority = 1000, | 274 | opts = {}, |
214 | config = function() | 275 | -- Optional dependencies |
215 | vim.cmd.colorscheme 'onedark' | 276 | dependencies = { |
216 | -- vim.cmd('source ~/.vim/vim-init/init/init-basic.vim') | 277 | "nvim-treesitter/nvim-treesitter", |
217 | end, | 278 | "nvim-tree/nvim-web-devicons" |
279 | }, | ||
218 | }, | 280 | }, |
219 | 281 | ||
282 | |||
220 | --{ | 283 | --{ |
221 | -- -- Set lualine as statusline | 284 | -- -- Set lualine as statusline |
222 | -- 'nvim-lualine/lualine.nvim', | 285 | -- 'nvim-lualine/lualine.nvim', |
@@ -368,6 +431,7 @@ vim.cmd('vmap s S') | |||
368 | -- require('lualine').setup { | 431 | -- require('lualine').setup { |
369 | -- options = { theme = custom_wombat }, | 432 | -- options = { theme = custom_wombat }, |
370 | -- } | 433 | -- } |
434 | |||
371 | -- [[ Configure lightline ]] | 435 | -- [[ Configure lightline ]] |
372 | vim.cmd("let g:lightline = { 'colorscheme': 'wombat' }") | 436 | vim.cmd("let g:lightline = { 'colorscheme': 'wombat' }") |
373 | 437 | ||
@@ -385,7 +449,7 @@ vim.o.autochdir = 0 | |||
385 | -- vim.cmd("autocmd BufWinEnter * if &buftype != 'quickfix' && getcmdwintype() == '' | silent NERDTreeMirror | endif") | 449 | -- vim.cmd("autocmd BufWinEnter * if &buftype != 'quickfix' && getcmdwintype() == '' | silent NERDTreeMirror | endif") |
386 | 450 | ||
387 | -- [ Configure Hop ] | 451 | -- [ Configure Hop ] |
388 | vim.keymap.set('n', '.', ':HopWord<CR>') | 452 | vim.keymap.set('n', "<space>", ':HopWord<CR>') |
389 | vim.keymap.set('n', '<C-.>', ':HopChar1<CR>') | 453 | vim.keymap.set('n', '<C-.>', ':HopChar1<CR>') |
390 | 454 | ||
391 | -- [[ Highlight on yank ]] | 455 | -- [[ Highlight on yank ]] |
@@ -434,7 +498,17 @@ require('telescope').setup { | |||
434 | } | 498 | } |
435 | } | 499 | } |
436 | } | 500 | } |
437 | } | 501 | }, |
502 | extensions = { | ||
503 | aerial = { | ||
504 | -- Display symbols as <root>.<parent>.<symbol> | ||
505 | show_nesting = { | ||
506 | ["_"] = false, -- This key will be the default | ||
507 | json = true, -- You can set the option for specific filetypes | ||
508 | yaml = true, | ||
509 | }, | ||
510 | }, | ||
511 | }, | ||
438 | } | 512 | } |
439 | 513 | ||
440 | -- Enable telescope fzf native, if installed | 514 | -- Enable telescope fzf native, if installed |
@@ -533,6 +607,18 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos | |||
533 | vim.keymap.set('n', '<leader>E', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) | 607 | vim.keymap.set('n', '<leader>E', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) |
534 | vim.keymap.set('n', '<leader>Q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) | 608 | vim.keymap.set('n', '<leader>Q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) |
535 | 609 | ||
610 | -- [[ Configure Aerial ]] | ||
611 | require("aerial").setup({ | ||
612 | -- optionally use on_attach to set keymaps when aerial has attached to a buffer | ||
613 | on_attach = function(bufnr) | ||
614 | -- Jump forwards/backwards with '{' and '}' | ||
615 | vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr }) | ||
616 | vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr }) | ||
617 | end, | ||
618 | }) | ||
619 | vim.keymap.set("n", "<leader><leader>a", "<cmd>Telescope aerial<CR>") | ||
620 | vim.keymap.set("n", "<leader><leader>A", "<cmd>AerialToggle!left<CR>") | ||
621 | |||
536 | -- [[ Configure LSP ]] | 622 | -- [[ Configure LSP ]] |
537 | -- This function gets run when an LSP connects to a particular buffer. | 623 | -- This function gets run when an LSP connects to a particular buffer. |
538 | local on_attach = function(_, bufnr) | 624 | local on_attach = function(_, bufnr) |