diff options
-rw-r--r-- | lazy-lock.json | 5 | ||||
-rw-r--r-- | lua/config.lua | 24 | ||||
-rw-r--r-- | lua/packages.lua | 55 |
3 files changed, 54 insertions, 30 deletions
diff --git a/lazy-lock.json b/lazy-lock.json index de42d6f..55ba57e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,14 +1,15 @@ { "LuaSnip": { "branch": "master", "commit": "bc8ec05022743d3f08bda7a76c6bb5e9a9024581" }, "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, "lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" }, "lsp-zero.nvim": { "branch": "v2.x", "commit": "93d50eb990a977a5a9842c715a0da27303fda29d" }, "lualine.nvim": { "branch": "master", "commit": "c28a7427c3fb29322db136f0564ec58807b26747" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "b64fdede85fd5e0b720ce722919e0a9b95ed6547" }, "mason.nvim": { "branch": "main", "commit": "c625abf171dfaad790f5703465a93a94334e5049" }, "nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" }, - "nvim-lspconfig": { "branch": "master", "commit": "8dc63a44bfe3188708f0b968c17a5260bdf75650" }, - "nvim-treesitter": { "branch": "master", "commit": "411e771d511442ab81670701f5c830f6c74aadd7" }, + "nvim-lspconfig": { "branch": "master", "commit": "0bc0c38e1b11dfb6b5f1794d53869f89ccf9e78f" }, + "nvim-treesitter": { "branch": "master", "commit": "871f5665d92d59a369cf916e9aa4d321d466f1e3" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "b55fe6175f0001347a433c9df358c8cbf8a4e90f" }, "nvim-web-devicons": { "branch": "master", "commit": "0568104bf8d0c3ab16395433fcc5c1638efc25d4" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, diff --git a/lua/config.lua b/lua/config.lua index cbe7560..f02493d 100644 --- a/lua/config.lua +++ b/lua/config.lua @@ -23,8 +23,28 @@ vim.o.encoding = "utf-8" vim.o.autoread = true vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "CursorHoldI", "FocusGained" }, { - command = "if mode() != 'c' | checktime | endif", - pattern = { "*" }, + command = "if mode() != 'c' | checktime | endif", + pattern = { "*" }, }) vim.o.cinoptions = "l1,g0,N-s,(s,U1,w1,Ws" + +vim.o.list = true +vim.o.listchars = "lead:ยท" + +require("indent_blankline").setup { + show_current_context = false, + show_current_context_start = false, + char_blankline = " ", +} + +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = {"*"}, + callback = function(ev) + save_cursor = vim.fn.getpos(".") + vim.cmd("%s/\\s\\+$//e") + vim.fn.setpos(".", save_cursor) + end, +}) + + diff --git a/lua/packages.lua b/lua/packages.lua index b84f5a9..c98ba8e 100644 --- a/lua/packages.lua +++ b/lua/packages.lua @@ -1,39 +1,39 @@ 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", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ - { - "nvim-telescope/telescope.nvim", tag = "0.1.1", - dependencies = { "nvim-lua/plenary.nvim" }, - }, + { + "nvim-telescope/telescope.nvim", tag = "0.1.1", + dependencies = { "nvim-lua/plenary.nvim" }, + }, { "nvim-telescope/telescope-fzf-native.nvim", build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", }, - { - "Mofiqul/vscode.nvim", - }, - { - "nvim-lualine/lualine.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { - "nvim-treesitter/nvim-treesitter", - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - build = ":TSUpdate", - }, + { + "Mofiqul/vscode.nvim", + }, + { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "nvim-treesitter/nvim-treesitter", + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + }, + build = ":TSUpdate", + }, { "VonHeikemen/lsp-zero.nvim", branch = "v2.x", @@ -51,4 +51,7 @@ require("lazy").setup({ { "L3MON4D3/LuaSnip" }, }, }, + { + "lukas-reineke/indent-blankline.nvim", + }, }) |