mirror of
https://github.com/szymon-jozef/superior_dotfiles.git
synced 2026-09-07 12:10:38 +02:00
Add .config/nvim/init.lua
Add .config/nvim/lazy-lock.json Add .config/nvim/lua/config/lazy.lua Add .config/nvim/lua/config/remaps.lua Add .config/nvim/lua/config/set.lua Add .config/nvim/lua/plugins/colorscheme.lua Add .config/nvim/lua/plugins/git.lua Add .config/nvim/lua/plugins/harpoon.lua Add .config/nvim/lua/plugins/lsp.lua Add .config/nvim/lua/plugins/telescope.lua Add .config/nvim/lua/plugins/whichkey.lua Add .config/nvim/spell/pl.cp1250.spl Add .config/nvim/spell/pl.iso-8859-2.spl Add .config/nvim/spell/pl.utf-8.spl
This commit is contained in:
36
private_dot_config/nvim/lua/config/lazy.lua
Normal file
36
private_dot_config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
-- 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.api.nvim_set_keymap('', "<Space>", "<Nop>", { noremap = true, silent = true })
|
||||
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 },
|
||||
})
|
||||
13
private_dot_config/nvim/lua/config/remaps.lua
Normal file
13
private_dot_config/nvim/lua/config/remaps.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
-- shift code --
|
||||
vim.keymap.set('x', '>', ">gv", { desc = "Shift code right" })
|
||||
vim.keymap.set('x', '<', "<gv", { desc = "Shift code left" })
|
||||
|
||||
-- lsp --
|
||||
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { noremap = true, silent = true, desc = "Code action" })
|
||||
|
||||
vim.keymap.set('n', '<leader>cf', vim.lsp.buf.format, { desc = "Code format" })
|
||||
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
|
||||
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, { desc = "Rename symbol" })
|
||||
34
private_dot_config/nvim/lua/config/set.lua
Normal file
34
private_dot_config/nvim/lua/config/set.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Colorscheme --
|
||||
vim.cmd.colorscheme "catppuccin-latte"
|
||||
-- Looks --
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.number = true
|
||||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.cursorline = false
|
||||
vim.opt.list = true
|
||||
vim.opt.wrap = false
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.list = true
|
||||
|
||||
-- Highlight line yank --
|
||||
vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
group = "YankHighlight",
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 200 })
|
||||
end,
|
||||
})
|
||||
|
||||
-- shared clipboard --
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Language --
|
||||
vim.opt.spell = true
|
||||
vim.opt.spelllang = { 'pl', 'en' }
|
||||
|
||||
-- Telescope --
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.git_files, { desc = 'Telescope find git files' })
|
||||
Reference in New Issue
Block a user