summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/config.lua24
-rw-r--r--lua/packages.lua55
2 files changed, 51 insertions, 28 deletions
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",
+ },
})