mirror of
https://github.com/eliasrenman/dotfiles.git
synced 2026-03-17 04:56:07 +01:00
chore: moved to support stow
This commit is contained in:
3
.config/nvim/lua/config/autocmds.lua
Normal file
3
.config/nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
46
.config/nvim/lua/config/keymaps.lua
Normal file
46
.config/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
-- Shorten function name
|
||||
function map(mode, lhs, rhs, opts)
|
||||
local options = vim.tbl_extend('force', { noremap = true, silent = true }, opts or {})
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
-- Modes
|
||||
-- normal_mode = "n",
|
||||
-- insert_mode = "i",
|
||||
-- visual_mode = "v",
|
||||
-- visual_block_mode = "x",
|
||||
-- ten
|
||||
|
||||
|
||||
-- duplicate line down
|
||||
map('i', '<C-d>', '<ESC>:normal! yyp<CR>i')
|
||||
map('n', '<C-d>', 'yyp')
|
||||
-- Tab indent
|
||||
map('n', '<Tab>', '>>')
|
||||
map('n', '<S-Tab>', '<<')
|
||||
-- select
|
||||
map('n', '<C-Left>', 'v')
|
||||
|
||||
-- undo last
|
||||
map('n', '<C-Z>', ':undo<CR>')
|
||||
map('i', '<C-Z>', '<Esc>:undo<CR>a')
|
||||
|
||||
-- Terminal open and close -> broken
|
||||
map('n', '<C-3>', ':terminal<CR>')
|
||||
map('i', '<C-3>', '<ESC>:terminal<CR>')
|
||||
map('t', '<C-3>', '<C-\\><C-N>:q<CR>')
|
||||
|
||||
-- Toggle comments with Ctrl + ' -> broken
|
||||
map('n', "<C-ä>", ':normal gcc<CR>')
|
||||
--map('n', "<C-ä>", ':Telescope find_files<CR>')
|
||||
map('i', "<C-ä>", '<Esc>:normal gcc<CR>i')
|
||||
|
||||
-- Open telescope
|
||||
map('i', '<C-p>', ':Telescope find_files<CR>')
|
||||
--- Move line up and down
|
||||
map("n", "<A-down>", ":m .+1<CR>==") -- move line down(n)
|
||||
map("n", "<A-up>", ":m .-2<CR>==") -- move line up(n)
|
||||
map("v", "<A-down>", ":m '>+1<CR>gv=gv") -- move line down(v)
|
||||
map("v", "<A-up>", ":m '<-2<CR>gv=gv") -- move line up(v)
|
||||
50
.config/nvim/lua/config/lazy.lua
Normal file
50
.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{ "nvim-telescope/telescope.nvim", dependencies = "tsakirist/telescope-lazy.nvim" },
|
||||
{ 'numToStr/Comment.nvim', lazy = false, },
|
||||
-- { "catppuccin/nvim", name = "catppuccin" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight-day" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
3
.config/nvim/lua/config/options.lua
Normal file
3
.config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
Reference in New Issue
Block a user