Upload files to "/"
This commit is contained in:
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# nvim-setup
|
||||||
|
Lua files for my personal neovim setup.
|
||||||
|
It uses Lazy to manage plugins.
|
||||||
87
init.lua
Normal file
87
init.lua
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user