diff options
author | Vitor Gonçalves <vitorg@tilde.team> | 2024-02-03 11:56:21 -0300 |
---|---|---|
committer | Vitor Gonçalves <vitorg@tilde.team> | 2024-02-03 11:56:28 -0300 |
commit | 173e25046f1bf8ff5b40849fc73833889d3f157e (patch) | |
tree | 1887398570a9005c32122c00be9cba4ee784d28d /.config | |
parent | 9b8432ef4c120b1e3e20276b69741445c6756a32 (diff) | |
download | dots-173e25046f1bf8ff5b40849fc73833889d3f157e.tar.gz |
nvim: fixed indentation, added treesitter/telescope
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/lua/config/init.lua | 8 | ||||
-rw-r--r-- | .config/nvim/lua/config/map.lua | 8 | ||||
-rw-r--r-- | .config/nvim/lua/config/plg.lua | 20 |
3 files changed, 25 insertions, 11 deletions
diff --git a/.config/nvim/lua/config/init.lua b/.config/nvim/lua/config/init.lua index c14e595..0a733d8 100644 --- a/.config/nvim/lua/config/init.lua +++ b/.config/nvim/lua/config/init.lua @@ -1,6 +1,6 @@ +require("config.plg") require("config.map") require("config.opt") -require("config.plg") -- Colorscheme configuration require("gruvbox").setup({ @@ -8,3 +8,9 @@ require("gruvbox").setup({ transparent_mode = true }) vim.cmd("colorscheme gruvbox") + +-- ensure highlighting +require("nvim-treesitter.configs").setup({ + ensure_installed = { "c", "lua", "go", "bash", "make", "html", "css" } +}) + diff --git a/.config/nvim/lua/config/map.lua b/.config/nvim/lua/config/map.lua index 24a286f..a64abed 100644 --- a/.config/nvim/lua/config/map.lua +++ b/.config/nvim/lua/config/map.lua @@ -1,3 +1,4 @@ +local tl = require("telescope.builtin") local key = vim.keymap vim.g.mapleader = " " @@ -11,4 +12,9 @@ key.set("n", "<C-l>", "<C-w>l") key.set("n", "<C-L>", ":vs<CR>") key.set("n", "<C-J>", ":sp<CR>") -key.set("n", "<Esc><Esc>", ":nohlsearch<CR>", { silent = true }) +key.set("n", "<Esc><Esc>", ":nohlsearch<CR>", { silent = true }) + +key.set("n", "<leader>ff", tl.find_files) +key.set("n", "<leader>f<leader>", tl.git_files) +key.set("n", "<leader><leader>", tl.buffers) + diff --git a/.config/nvim/lua/config/plg.lua b/.config/nvim/lua/config/plg.lua index c08d99c..d1b9871 100644 --- a/.config/nvim/lua/config/plg.lua +++ b/.config/nvim/lua/config/plg.lua @@ -1,19 +1,21 @@ -- Initialize lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) end vim.opt.rtp:prepend(lazypath) local plugins = { - { "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...} + { "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...}, + { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, + { 'nvim-telescope/telescope.nvim', tag = '0.1.5', dependencies = { 'nvim-lua/plenary.nvim' } } } require("lazy").setup(plugins, {}) |