Split neovim for neatness and ease of use.
This commit is contained in:
46
config/nvim/lua/plugins/init.lua
Normal file
46
config/nvim/lua/plugins/init.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
||||
{ src = "https://github.com/tribela/transparent.nvim" },
|
||||
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" },
|
||||
{ src="https://github.com/folke/trouble.nvim" },
|
||||
{ src="https://github.com/stevearc/oil.nvim" }
|
||||
})
|
||||
|
||||
local map = vim.keymap.set
|
||||
local acmd = vim.api.nvim_create_autocmd
|
||||
|
||||
acmd('FileType', {
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
pcall(vim.treesitter.start)
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
})
|
||||
|
||||
require("fzf-lua").setup()
|
||||
map("n", "<leader>ff", ":lua FzfLua.files()<CR>")
|
||||
map("n", "<leader>fo", ":lua FzfLua.buffers()<CR>")
|
||||
map("n", "<leader>sp", ":lua FzfLua.grep_project()<CR>")
|
||||
map("n", "<leader>sf", ":lua FzfLua.grep_curbuf()<CR>")
|
||||
map("n", "<leader>sw", ":lua FzfLua.grep_cword()<CR>")
|
||||
map("n", "<leader>sh", ":lua FzfLua.help_tags()<CR>")
|
||||
|
||||
require("trouble").setup()
|
||||
map("n", "<leader>pa", ":lua FzfLua.lsp_code_actions()<CR>")
|
||||
map('n', '<leader>pp', ":Trouble diagnostics toggle<CR>")
|
||||
|
||||
require("oil").setup({
|
||||
keymaps = {
|
||||
["q"] = { "actions.close", mode = "n" },
|
||||
["h"] = "actions.parent",
|
||||
["l"] = "actions.select",
|
||||
["<C-s>"] = false,
|
||||
["<C-h>"] = false,
|
||||
["gh"] = "actions.toggle_hidden",
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = false,
|
||||
}
|
||||
})
|
||||
map("n", "<leader>e", ":Oil " .. vim.fn.getcwd() .. "<CR>")
|
||||
Reference in New Issue
Block a user