Compare commits

...

2 commits

Author SHA1 Message Date
6711c0711c
treewide: space -> leader 2024-07-08 14:41:44 +08:00
e72991818b
treesitter: unbreak 2024-07-08 14:41:39 +08:00
6 changed files with 22 additions and 8 deletions

View file

@ -1,3 +1,7 @@
-- Leader key
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Better file reading
vim.opt.autoread = true
vim.opt.autowrite = true

View file

@ -11,6 +11,6 @@ return {
},
},
keys = {
{ "<Space>a", "<cmd>Lspsaga code_action<CR>", desc = "Code Action" },
{ "<leader>a", "<cmd>Lspsaga code_action<CR>", desc = "Code Action" },
},
}

View file

@ -9,6 +9,6 @@ return {
vim.g.neoformat_enabled_nix = { "alejandra" }
end,
keys = {
{ "<Space>lf", "<cmd>Neoformat<CR>", desc = "Format file" },
{ "<leader>lf", "<cmd>Neoformat<CR>", desc = "Format file" },
},
}

View file

@ -10,6 +10,6 @@ return {
vim.g.loaded_netrwPlugin = 1
end,
keys = {
{ "<Space>e", "<cmd>NvimTreeFindFileToggle<CR>", desc = "File Explorer" },
{ "<leader>e", "<cmd>NvimTreeFindFileToggle<CR>", desc = "File Explorer" },
},
}

View file

@ -3,14 +3,24 @@ return {
build = ":TSUpdate",
opts = {
ensure_installed = {
"nix",
"bash",
"c",
"diff",
"html",
"lua",
"luadoc",
"markdown",
"nix",
"vim",
"vimdoc",
},
sync_install = true,
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.install").prefer_git = true
require("nvim-treesitter.configs").setup(opts)
end,
}

View file

@ -7,8 +7,8 @@ return {
opts = {},
cmd = "Telescope",
keys = {
{ "<Space>f", "<cmd>Telescope find_files<CR>", desc = "Find files" },
{ "<Space><Space>", "<cmd>Telescope oldfiles<CR>", desc = "Recent files" },
{ "<Space>sg", "<cmd>Telescope live_grep<CR>", desc = "Live grep" },
{ "<leader>f", "<cmd>Telescope find_files<CR>", desc = "Find files" },
{ "<leader><leader>", "<cmd>Telescope oldfiles<CR>", desc = "Recent files" },
{ "<leader>sg", "<cmd>Telescope live_grep<CR>", desc = "Live grep" },
},
}