Skip to content

Instantly share code, notes, and snippets.

@jarkkojs
Created May 8, 2023 22:20
Show Gist options
  • Save jarkkojs/7c94f061d3aa253b782dc5a0806c899d to your computer and use it in GitHub Desktop.
Save jarkkojs/7c94f061d3aa253b782dc5a0806c899d to your computer and use it in GitHub Desktop.
-- Copyright (C) 2023 Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
vim.cmd("filetype plugin indent on")
vim.cmd [[packadd packer.nvim]]
local function plugins(use)
use 'wbthomason/packer.nvim'
use 'ap/vim-buftabline'
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use 'Mofiqul/dracula.nvim'
use 'mmarchini/bpftrace.vim'
use 'vim-scripts/git_patch_tags.vim'
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',
requires = {
{'neovim/nvim-lspconfig'},
{
'williamboman/mason.nvim',
run = function()
pcall(vim.cmd, 'MasonUpdate')
end,
},
{'williamboman/mason-lspconfig.nvim'},
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-nvim-lsp'},
{'L3MON4D3/LuaSnip'},
}
}
end
require('packer').startup(plugins)
vim.g.mapleader = ","
vim.opt.autoindent = true
vim.opt.backspace = "indent,eol,start"
vim.opt.backup = false
vim.opt.clipboard = "unnamedplus"
vim.opt.compatible = false
vim.opt.completeopt = "menuone,noinsert,noselect"
vim.opt.hidden = true
vim.opt.history = 2000
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.listchars="tab:>-,trail:·"
vim.opt.mouse = ""
vim.opt.path:append("**")
vim.opt.ruler = true
vim.opt.shortmess:append("c")
vim.opt.showmatch = true
vim.opt.swapfile = false
vim.opt.tags = "./tags;/"
vim.opt.termguicolors = true
vim.opt.wildmenu = true
vim.opt.wrap = false
if vim.g.neovide then
vim.o.guifont = "FiraCode Nerd Font Mono:h12"
end
vim.api.nvim_create_autocmd(
{ "FocusGained", "BufEnter" },
{ pattern = "*", command = [[:checktime]],
group = vim.api.nvim_create_augroup("BufCheck", { clear = true }) }
)
local function nmap(shortcut, command)
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap('n', shortcut, command, opts)
end
nmap("<silent>", "<C-l> :nohl<CR><C-l>")
nmap("<leader>cd", ":lcd %:p:h<CR>:pwd<CR>")
vim.cmd[[colorscheme dracula]]
require('lualine').setup {
options = {
theme = 'dracula-nvim'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment