started setup
This commit is contained in:
parent
62690421d8
commit
914ecc923c
|
|
@ -0,0 +1,4 @@
|
|||
require("config.lazy")
|
||||
|
||||
require("config.behaviour")
|
||||
require("config.keymap")
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
-- Encoding
|
||||
vim.opt.encoding = "UTF-8"
|
||||
|
||||
-- Line numbers
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- Formatting
|
||||
-- -- Indent
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.expandtab = false
|
||||
|
||||
-- Terminal
|
||||
vim.opt.wildmenu = true
|
||||
vim.opt.showcmd = true
|
||||
vim.opt.showmatch = true
|
||||
|
||||
-- Mouse
|
||||
vim.opt.mouse = "a"
|
||||
|
||||
-- Copy
|
||||
vim.g.clipboard = {
|
||||
name = 'WslClipboard',
|
||||
copy = {
|
||||
["+"] = 'clip.exe',
|
||||
["*"] = 'clip.exe',
|
||||
},
|
||||
paste = {
|
||||
["+"] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
||||
["*"] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
||||
},
|
||||
cache_enabled = 0,
|
||||
}
|
||||
vim.api.nvim_set_option("clipboard","unnamed") -- Always copy to clipboard
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
--vim.keymap.set("", "<S-Tab>", "<C-d>", { remap = true })
|
||||
|
||||
-- Move by words
|
||||
vim.keymap.set("", "<C-j>", "b")
|
||||
vim.keymap.set("", "<C-l>", "e")
|
||||
vim.keymap.set("", "<C-Left>", "b")
|
||||
vim.keymap.set("", "<C-Right>", "e")
|
||||
vim.keymap.set("i", "<C-Left>", "<C-o>b")
|
||||
vim.keymap.set("i", "<C-Right>", "<C-o>e<Right>")
|
||||
|
||||
-- Select
|
||||
vim.keymap.set("", "<C-a>", "ggVG")
|
||||
|
||||
-- reselect visual selection after indentation
|
||||
vim.keymap.set("v", "<", "< gv")
|
||||
vim.keymap.set("v", ">", "> gv")
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require('lualine').setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- must be installed
|
||||
"c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline",
|
||||
|
||||
-- C
|
||||
"cmake",
|
||||
},
|
||||
sync_install = false,
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_higlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
init_selection = "<C-Space>",
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
{
|
||||
"tiagovla/tokyodark.nvim",
|
||||
opts = {
|
||||
lazy = false,
|
||||
priority = 100,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("tokyodark").setup(opts) -- calling setup is optional
|
||||
vim.cmd [[colorscheme tokyodark]]
|
||||
end,
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue