Skip to content

Commit

Permalink
feat: add docgen, QOL in neotree, lspzero, treesitter
Browse files Browse the repository at this point in the history
  • Loading branch information
kaichevannes committed Nov 17, 2024
1 parent c8af8e1 commit 0619bb7
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 66 deletions.
9 changes: 5 additions & 4 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "cab00668464d2914d0752b86168b4a431cc93eb2" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" },
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-lspconfig": { "branch": "master", "commit": "d2d153a179ed59aa7134d7ebdf4d7dcb156efa22" },
"nvim-treesitter": { "branch": "master", "commit": "e1e3108cd23d7f967842261bd66126b6734d8907" },
"nvim-lspconfig": { "branch": "master", "commit": "87c7c83ce62971e0bdb29bb32b8ad2b19c8f95d0" },
"nvim-treesitter": { "branch": "master", "commit": "1c0cbdef44a2cc35c6436e0866a2a5282b339ffd" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-doge": { "branch": "master", "commit": "188351964c8b2540a69c1d2648b3c6e7877a016f" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }
Expand Down
3 changes: 3 additions & 0 deletions lua/plugins/doge.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
return {
"kkoomen/vim-doge",
}
2 changes: 1 addition & 1 deletion lua/plugins/lspzero.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ return {
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
vim.keymap.set({ 'n', 'x' }, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
vim.keymap.set({ 'n', 'x', 'i' }, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
end,

Expand Down
72 changes: 38 additions & 34 deletions lua/plugins/neo-tree.lua
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function()
require("neo-tree").setup({
window = {
width = 28,
mappings = {
['e'] = function() vim.api.nvim_exec('Neotree focus filesystem left', true) end,
['b'] = function() vim.api.nvim_exec('Neotree focus buffers left', true) end,
['g'] = function() vim.api.nvim_exec('Neotree focus git_status left', true) end,
}
},
filesystem = {
filtered_items = {
visible = false,
show_hidden_count = true,
hide_dotfiles = true,
hide_gitignored = false,
hide_by_name = {
-- '.git',
-- "node_modules"
},
never_show = {},
},
}
})
vim.keymap.set("n", "<leader>jv", "<Cmd>Neotree toggle<CR>")
end
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function()
require("neo-tree").setup({
window = {
width = 28,
auto_expand_width = true;
mappings = {
['e'] = function() vim.api.nvim_exec('Neotree focus filesystem left', true) end,
['b'] = function() vim.api.nvim_exec('Neotree focus buffers left', true) end,
['g'] = function() vim.api.nvim_exec('Neotree focus git_status left', true) end,
}
},
filesystem = {
filtered_items = {
visible = false,
show_hidden_count = true,
hide_dotfiles = true,
hide_gitignored = false,
hide_by_name = {
-- '.git',
-- "node_modules"
},
never_show = {},
follow_current_file = {
enabled = true,
}
},
}
})
vim.keymap.set("n", "<leader>jv", "<Cmd>Neotree toggle<CR>")
end
}
54 changes: 27 additions & 27 deletions lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
return {
-- Install nvim-treesitter
{
"nvim-treesitter/nvim-treesitter", -- The plugin
run = ":TSUpdate", -- Runs :TSUpdate after installation to install parsers
config = function()
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = { "javascript", "typescript", "python", "css", "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
-- Install nvim-treesitter
{
"nvim-treesitter/nvim-treesitter", -- The plugin
run = ":TSUpdate", -- Runs :TSUpdate after installation to install parsers
config = function()
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = { "javascript", "typescript", "python", "css", "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },

-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,

-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,

indent = {
enable = true
},
indent = {
enable = true
},

highlight = {
enable = true,
highlight = {
enable = true,

-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
end
}
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
end
}
}

0 comments on commit 0619bb7

Please sign in to comment.