commit eb881296c34b0c03f02633ee83ba1f25ff61f775 Author: The Chef Date: Sun Apr 20 18:20:03 2025 +0000 Upload files to "/" diff --git a/README.md b/README.md new file mode 100644 index 0000000..1156914 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# nvim-setup +Lua files for my personal neovim setup. +It uses Lazy to manage plugins. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..11f4a7a --- /dev/null +++ b/init.lua @@ -0,0 +1,87 @@ +-- --------------------------------------------------------------------------------------------- +-- General configuration +-- --------------------------------------------------------------------------------------------- +-- Basic set--[[ tings ]] +vim.opt.hlsearch = true +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.mouse = "a" +vim.opt.showmode = false +vim.opt.spelllang = "en_gb" + +-- use nvim-tree instead +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- Use system clipboard +vim.opt.clipboard:append({ "unnamed", "unnamedplus" }) + +-- require Lazy Vim +require("config.lazy") + + +-- Tab stuff +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.autoindent = true + +-- Search configuration +vim.opt.ignorecase = true +vim.opt.smartcase = true +vim.opt.gdefault = true + +-- scroll a bit extra horizontally and vertically when at the end/bottom +vim.opt.sidescrolloff = 6 +vim.opt.scrolloff = 6 + +-- open new split panes to right and below (as you probably expect) +vim.opt.splitright = true +vim.opt.splitbelow = true + +-- remember cursor location +local lastplace = vim.api.nvim_create_augroup("LastPlace", {}) +vim.api.nvim_clear_autocmds({ group = lastplace }) +vim.api.nvim_create_autocmd("BufReadPost", { + group = lastplace, + pattern = { "*" }, + desc = "remember last cursor place", + callback = function() + local mark = vim.api.nvim_buf_get_mark(0, '"') + local lcount = vim.api.nvim_buf_line_count(0) + if mark[1] > 0 and mark[1] <= lcount then + pcall(vim.api.nvim_win_set_cursor, 0, mark) + end + end, +}) + +require('lualine').setup() + +-- require move.nvim +require('move').setup({ + line = { + enable = true, -- Enables line movement + indent = true -- Toggles indentation + }, + block = { + enable = true, -- Enables block movement + indent = true -- Toggles indentation + }, + word = { + enable = false, -- Enables word movement + }, + char = { + enable = false -- Enables char movement + } +}) + +-- use habamax theme +-- vim.cmd([[colorscheme habamax]]) +vim.cmd([[colorscheme wildcharm]]) + +-- require files with keybindings +require("keybinds") +require("telebinds") + +-- setting true color +vim.opt.termguicolors = true