This commit is contained in:
Raoul Branten 2024-01-08 13:28:36 +01:00
parent 2d651c5e59
commit 88297963cf
16 changed files with 160 additions and 13 deletions

View File

@ -1,4 +1,5 @@
require("core.options")
require("core.keymaps")
require("core.plugins")
require("core.aliases")
require("core.plugin_config")

5
lua/core/aliases.lua Normal file
View File

@ -0,0 +1,5 @@
-- alias for clearing all buffers
--vim.cmd [[ command Bclr bufdo! bd! ]]
-- alias for reloading all buffers
--vim.cmd [[ command Bclr bufdo! e!]]

View File

@ -11,3 +11,6 @@ vim.keymap.set('n', '<Right>', ':echoe "Yo retard use l"<CR>')
vim.keymap.set('n', '<Up>', ':echoe "Yo retard use k"<CR>')
vim.keymap.set('n', '<Down>', ':echoe "Yo retard use j"<CR>')
vim.opt.mouse = ''
--" dont automatically jump when searching
vim.keymap.set('n', '*', '*```<CR>')

View File

@ -2,7 +2,7 @@
vim.opt.backspace = '2'
vim.opt.showcmd = true
vim.opt.laststatus = 2
vim.opt.autowrite = true
--vim.opt.autowrite = true
-- general look and feel
vim.opt.cursorline = true
@ -16,16 +16,16 @@ vim.opt.wildmode = 'longest,list'
vim.opt.ttyfast = true
vim.opt.pastetoggle = '<F3>'
-- spacing
-- formatting
vim.opt.expandtab = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.shiftround = true
vim.opt.expandtab = true
-- formatting
vim.opt.autoindent = true
vim.opt.list = true
vim.opt.listchars = 'eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:·'
vim.opt.smartindent = true
vim.opt.wrap = false
-- ERROR vim.opt.smartindend = true
-- ERROR vim.opt.nowrap = true

View File

View File

@ -1,9 +1,9 @@
local opts = {
scope = 'line',
modes = { 'i', 'ic', 'ix', 'R', 'Rc', 'Rx', 'Rv', 'Rvc', 'Rvx' },
modes = { 'i', 'ic', 'ix', 'n', 'R', 'Rc', 'Rx', 'Rv', 'Rvc', 'Rvx' },
blending = {
threshold = 0.75,
colorcode = '#000000',
colorcode = '#FFF000',
hlgroup = {
'Normal',
'background',

View File

@ -1,2 +1,10 @@
-- see https://github.com/morhetz/gruvbox/
print("foo")
vim.g.gruvbox_italic_keyword = true
vim.o.termguicolors = true
vim.o.background = 'dark'
vim.cmd [[ highlight Normal ctermbg=black ]]
vim.cmd [[ highlight GruvboxBlue guifg=#83a598 ]]
vim.o.fillchars = "vert:|"
vim.cmd [[ hi! VertSplit term=reverse ctermfg=236 ctermbg=132 ]]
vim.cmd [[ colorscheme gruvbox ]]

View File

@ -7,4 +7,9 @@ require("core.plugin_config.vim-fugitive")
require("core.plugin_config.tagbar")
require("core.plugin_config.vim-gitgutter")
require("core.plugin_config.deadcolumn")
require("core.plugin_config.colorizer")
require("core.plugin_config.synattr")
require("core.plugin_config.rainbow-delimiters")
require("core.plugin_config.marks")
require("core.plugin_config.lsp_config")

View File

@ -0,0 +1,12 @@
require("mason").setup()
require("mason-lspconfig").setup({
})
require("lspconfig").phpactor.setup({
on_attach = on_attach,
init_options = {
["language_server_phpstan.enabled"] = false,
["language_server_psalm.enabled"] = false,
}
})
--require("lspconfig").sumneko_lua.setup {}

View File

@ -0,0 +1,34 @@
require'marks'.setup {
-- whether to map keybinds or not. default true
default_mappings = true,
-- which builtin marks to show. default {}
builtin_marks = { ".", "<", ">", "^" },
-- whether movements cycle back to the beginning/end of buffer. default true
cyclic = true,
-- whether the shada file is updated after modifying uppercase marks. default false
force_write_shada = false,
-- how often (in ms) to redraw signs/recompute mark positions.
-- higher values will have better performance but may cause visual lag,
-- while lower values may cause performance penalties. default 150.
refresh_interval = 250,
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
-- marks, and bookmarks.
-- can be either a table with all/none of the keys, or a single number, in which case
-- the priority applies to all marks.
-- default 10.
sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
-- disables mark tracking for specific filetypes. default {}
excluded_filetypes = {},
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
-- default virt_text is "".
bookmark_0 = {
sign = "",
virt_text = "hello world",
-- explicitly prompt for a virtual line annotation when setting a bookmark from this group.
-- defaults to false.
annotate = false,
},
mappings = {}
}

View File

@ -0,0 +1,24 @@
-- This module contains a number of default definitions
local rainbow_delimiters = require 'rainbow-delimiters'
vim.g.rainbow_delimiters = {
strategy = {
[''] = rainbow_delimiters.strategy['global'],
commonlisp = rainbow_delimiters.strategy['local'],
},
query = {
[''] = 'rainbow-delimiters',
lua = 'rainbow-blocks',
},
highlight = {
'RainbowDelimiterRed',
'RainbowDelimiterYellow',
'RainbowDelimiterBlue',
'RainbowDelimiterOrange',
'RainbowDelimiterGreen',
'RainbowDelimiterViolet',
'RainbowDelimiterCyan',
},
blacklist = {'c', 'cpp'},
}

View File

@ -0,0 +1 @@
-- map -a :call SyntaxAttr()<CR>

View File

@ -0,0 +1 @@
vim.keymap.set('n', '<F8>', ':TagbarToggle<CR>')

View File

@ -5,6 +5,6 @@ require 'nvim-treesitter.configs'.setup {
sync_install = false,
auto_install = true,
highlight = {
enable = true,
enable = false,
},
}

View File

@ -15,11 +15,14 @@ return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
-- My plugins here
use 'ellisonleao/gruvbox.nvim'
use 'morhetz/gruvbox'
use 'nvim-tree/nvim-tree.lua'
use 'nvim-tree/nvim-web-devicons'
use 'nvim-lualine/lualine.nvim'
use 'nvim-treesitter/nvim-treesitter'
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.3',
@ -29,6 +32,16 @@ return require('packer').startup(function(use)
use 'majutsushi/tagbar'
use 'airblade/vim-gitgutter'
use 'Bekaboo/deadcolumn.nvim'
use {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
}
use 'norcalli/nvim-colorizer.lua'
use 'vim-scripts/SyntaxAttr.vim'
--use 'romgrk/barbar.nvim'
use 'HiPhish/rainbow-delimiters.nvim'
use 'chentoast/marks.nvim'
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins

View File

@ -74,16 +74,51 @@ end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["gruvbox.nvim"] = {
["SyntaxAttr.vim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/gruvbox.nvim",
url = "https://github.com/ellisonleao/gruvbox.nvim"
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/SyntaxAttr.vim",
url = "https://github.com/vim-scripts/SyntaxAttr.vim"
},
["deadcolumn.nvim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/deadcolumn.nvim",
url = "https://github.com/Bekaboo/deadcolumn.nvim"
},
gruvbox = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/gruvbox",
url = "https://github.com/morhetz/gruvbox"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["marks.nvim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/marks.nvim",
url = "https://github.com/chentoast/marks.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["nvim-colorizer.lua"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua",
url = "https://github.com/norcalli/nvim-colorizer.lua"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-tree.lua"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
@ -109,6 +144,11 @@ _G.packer_plugins = {
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["rainbow-delimiters.nvim"] = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/rainbow-delimiters.nvim",
url = "https://github.com/HiPhish/rainbow-delimiters.nvim"
},
tagbar = {
loaded = true,
path = "/home/raoul/.local/share/nvim/site/pack/packer/start/tagbar",