First commit.
This commit is contained in:
commit
164e828e70
22 changed files with 1241 additions and 0 deletions
13
lua/crony/init.lua
Normal file
13
lua/crony/init.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require('crony.set')
|
||||
require('crony.map')
|
||||
require('crony.lazy')
|
||||
|
||||
-- [[ Highlight on yank ]]
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
group = highlight_group,
|
||||
pattern = '*',
|
||||
})
|
151
lua/crony/lazy.lua
Normal file
151
lua/crony/lazy.lua
Normal file
|
@ -0,0 +1,151 @@
|
|||
-- bootstraping
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- plugins installation and configuration
|
||||
require('lazy').setup({
|
||||
-- Git plugins
|
||||
'tpope/vim-fugitive',
|
||||
|
||||
|
||||
|
||||
{
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v1.x',
|
||||
dependencies = {
|
||||
-- LSP Support
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
{ 'williamboman/mason.nvim' },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
|
||||
-- Autocompletion
|
||||
{ 'hrsh7th/nvim-cmp' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'saadparwaiz1/cmp_luasnip' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
{ 'hrsh7th/cmp-nvim-lua' },
|
||||
|
||||
-- Snippets
|
||||
{ 'L3MON4D3/LuaSnip' },
|
||||
{ 'rafamadriz/friendly-snippets' },
|
||||
|
||||
-- Nice lsp info
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
|
||||
-- Additional neovim docs
|
||||
'folke/neodev.nvim',
|
||||
opts = {},
|
||||
}
|
||||
},
|
||||
|
||||
-- Emacs which key but in a much nicer form
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
|
||||
{
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
},
|
||||
|
||||
{
|
||||
-- Catppuccin, the best pastell color scheme
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
},
|
||||
|
||||
{
|
||||
-- Set lualine as statusline
|
||||
'nvim-lualine/lualine.nvim',
|
||||
-- See `:help lualine.txt`
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = 'catppuccin',
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- show indent line
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
},
|
||||
|
||||
-- highlight indentscope
|
||||
"echasnovski/mini.indentscope",
|
||||
|
||||
-- "gc" to comment visual regions/lines
|
||||
{ 'numToStr/Comment.nvim', opts = {} },
|
||||
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
},
|
||||
|
||||
{
|
||||
-- netrw on crack
|
||||
'stevearc/oil.nvim',
|
||||
opts = {
|
||||
},
|
||||
-- Optional dependencies
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
|
||||
{
|
||||
-- harpoon your way around code
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
requires = { "nvim-lua/plenary.nvim " }
|
||||
}
|
||||
},
|
||||
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
opts = {
|
||||
input = { default_prompt = "➤ " },
|
||||
select = { backend = { "telescope", "builtin" } },
|
||||
},
|
||||
},
|
||||
|
||||
-- nice tmux integration
|
||||
'christoomey/vim-tmux-navigator',
|
||||
|
||||
-- smart autopairs
|
||||
'windwp/nvim-autopairs',
|
||||
|
||||
{
|
||||
-- nicer notification's
|
||||
'rcarriga/nvim-notify',
|
||||
config = function()
|
||||
vim.notify = require("notify")
|
||||
end
|
||||
},
|
||||
|
||||
-- markdown editing super powered
|
||||
'jakewvincent/mkdnflow.nvim',
|
||||
}, {})
|
12
lua/crony/map.lua
Normal file
12
lua/crony/map.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
-- Leader
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ';'
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||
|
||||
-- Lsp format
|
||||
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format, { desc = "Format current buffer" })
|
54
lua/crony/set.lua
Normal file
54
lua/crony/set.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
-- Don't highlight on search
|
||||
vim.o.hlsearch = false
|
||||
vim.o.incsearch = true
|
||||
|
||||
-- Enable line numbers by default
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
|
||||
-- Tab settings
|
||||
vim.o.tabstop = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = true
|
||||
|
||||
-- Enable smart indenting
|
||||
vim.o.smartindent = true
|
||||
|
||||
-- Enable the mouse, just to have it
|
||||
vim.o.mouse = 'a'
|
||||
|
||||
-- Enable system clipboard
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
-- History settings
|
||||
vim.o.undofile = true
|
||||
vim.o.undodir = os.getenv("HOME") .. "/.local/state/nvim"
|
||||
vim.o.swapfile = true
|
||||
vim.o.swapfile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or capital in search
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.o.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 50
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
|
||||
-- Enable true color support
|
||||
vim.o.termguicolors = true
|
||||
|
||||
-- Enable scroll off
|
||||
vim.o.scrolloff = 8
|
||||
|
||||
-- Color the 80 column
|
||||
vim.o.colorcolumn = "80"
|
Loading…
Add table
Add a link
Reference in a new issue