Split neovim for neatness and ease of use.

This commit is contained in:
2026-04-12 09:23:49 +02:00
parent 8f1e635b23
commit 5faac9379b
2 changed files with 73 additions and 48 deletions

View 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>")