From a97eac8f72024ae2da041bf9e5d487e8b93e9950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Sun, 10 Nov 2024 16:49:52 +0100 Subject: [PATCH] more plugins --- after/plugin/lualine.lua | 19 +++++++++++++++++++ after/plugin/telescope.lua | 2 ++ after/plugin/treesitter.lua | 5 ++++- lazy-lock.json | 4 ++++ lua/zak/plugins.lua | 15 ++++++++++++++- lua/zak/remap.lua | 2 ++ lua/zak/set.lua | 7 +++++++ 7 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 after/plugin/lualine.lua diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua new file mode 100644 index 0000000..bb72cc5 --- /dev/null +++ b/after/plugin/lualine.lua @@ -0,0 +1,19 @@ +require('lualine').setup({ + sections = { + lualine_a = {'mode', {'datetime', style = '%I:%M %p'}}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, +}) + diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index b5b1af4..ba3769f 100644 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -1,7 +1,9 @@ local builtin = require('telescope.builtin') vim.keymap.set('n', 'pf', builtin.find_files, {}) +vim.keymap.set('n', '', builtin.find_files, {}) vim.keymap.set('n', 'pg', builtin.git_files, {}) vim.keymap.set('n', 'pb', builtin.buffers, {}) +vim.keymap.set('n', '', builtin.buffers, {}) vim.keymap.set('n', 'ps', function() builtin.grep_string({ search = vim.fn.input("Grep > ") }) end) diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua index 63391b9..a570f36 100644 --- a/after/plugin/treesitter.lua +++ b/after/plugin/treesitter.lua @@ -1,6 +1,6 @@ require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "javascript", "c", "cpp", "lua", "vim", "vimdoc", "query" }, + ensure_installed = { "javascript", "c", "cpp", "lua", "vim", "vimdoc", "query", "glsl" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, @@ -14,3 +14,6 @@ require'nvim-treesitter.configs'.setup { additional_vim_regex_highlighting = false, }, } + +--vim.treesitter.language.register("glsl", {'gl', 'glsl', 'fx'}) +vim.treesitter.language.register("glsl", 'gl') diff --git a/lazy-lock.json b/lazy-lock.json index 19853d4..a54f116 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -12,11 +12,15 @@ "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" }, "lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, "nvim-lspconfig": { "branch": "master", "commit": "d01864641c6e43c681c3e9f6cf4745c75fdd9dcc" }, "nvim-treesitter": { "branch": "master", "commit": "0603b3e3d21ebe2fa82dc5361a3d500e0d3ad3a8" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, diff --git a/lua/zak/plugins.lua b/lua/zak/plugins.lua index 41085fd..1a03669 100644 --- a/lua/zak/plugins.lua +++ b/lua/zak/plugins.lua @@ -15,6 +15,10 @@ end vim.opt.rtp:prepend(lazypath) return require('lazy').setup({ + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' } + }, 'github/copilot.vim', { 'numToStr/Comment.nvim', @@ -36,7 +40,16 @@ return require('lazy').setup({ -- vim.cmd('colorscheme rose-pine') -- 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 + } + }, { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' diff --git a/lua/zak/remap.lua b/lua/zak/remap.lua index 6a1ec91..5c733ab 100644 --- a/lua/zak/remap.lua +++ b/lua/zak/remap.lua @@ -1,5 +1,6 @@ vim.g.mapleader = " " vim.keymap.set("n", "pv", vim.cmd.Ex) +vim.keymap.set("n", "", ":Neotree right filesystem reveal toggle") vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv") @@ -12,6 +13,7 @@ vim.keymap.set("n", "", "zz") vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("n", "", "") +vim.keymap.set("n", "", "") -- terminal remaps vim.keymap.set("t", "", "", { noremap = true, silent = true }) diff --git a/lua/zak/set.lua b/lua/zak/set.lua index 37f2507..d15f925 100644 --- a/lua/zak/set.lua +++ b/lua/zak/set.lua @@ -31,3 +31,10 @@ vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 vim.opt.colorcolumn = "120" + +vim.cmd [[ + augroup ShadersType + autocmd! + autocmd BufRead,BufNewFile *.gl set filetype=glsl + augroup END +]]