Delete neovim directory

This commit is contained in:
Rawley Fowler 2022-09-19 13:58:46 -06:00 committed by GitHub
parent f88a2bd861
commit 527a1fbe93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 0 additions and 410 deletions

View file

@ -1,11 +0,0 @@
vim.opt.background = 'dark'
vim.cmd('colorscheme cosme')
vim.g.airline_theme = 'cosme'
local cl = function(t, o)
vim.api.nvim_set_hl(0, t, o)
end
cl('LineNr', {
bg = '#222222',
})

View file

@ -1,118 +0,0 @@
local nnoremap = require('rf.binds').nnoremap
local inoremap = require('rf.binds').inoremap
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- cmp
local cmp = require('cmp')
local source_mapping = {
buffer = '[Buffer]',
nvim_lsp = '[LSP]',
nvim_lua = '[Lua]',
cmp_tabnine = '[TN]',
path = '[Path]',
}
local lspkind = require('lspkind')
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
['<cr>'] = cmp.mapping.confirm({ select = true }),
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-d>"] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
}),
formatting = {
format = function(entry, vim_item)
vim_item.kind = lspkind.presets.default[vim_item.kind]
local menu = source_mapping[entry.source.name]
if entry.source.name == "cmp_tabnine" then
if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then
menu = entry.completion_item.data.detail .. " " .. menu
end
vim_item.kind = ""
end
vim_item.menu = menu
return vim_item
end,
},
sources = {
{ name = "cmp_tabnine" },
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
},
})
local function config(conf)
return vim.tbl_deep_extend('force', {
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()),
on_attch = function()
inoremap('<C-h>', function() vim.lsp.buf.signature_help() end)
end,
}, conf or {})
end
-- LSP configurations
local simple_language_servers = { 'tsserver', 'solargraph', 'ocamllsp' }
for _, v in ipairs(simple_language_servers) do
require('lspconfig')[v].setup(config())
end
require('lspconfig').gopls.setup(config({
cmd = { 'gopls', 'serve' },
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
},
},
}));
-- Lua snip
local snippets_paths = function()
local plugs = { 'friendly-snippets' }
local paths = {}
local path
local root_path = vim.env.HOME .. '/.vim/plugged/'
for _, plug in ipairs(plugs) do
path = root_path .. plug
if vim.fn.isdirectory(path) ~= 0 then
table.insert(paths, path)
end
end
return paths
end
require('luasnip.loaders.from_vscode').lazy_load({
paths = snippets_paths(),
include = nil,
exclude = {},
})
-- Auto complete
vim.cmd([[
" Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect
" Avoid showing message extra message when using completion
set shortmess+=c
]])

View file

@ -1,12 +0,0 @@
local nnoremap = require('rf.binds').nnoremap
local nmap = require('rf.binds').nmap
-- Buffer cycling
nnoremap('<C-h>', ':bprev<cr>')
nnoremap('<C-l>', ':bnext<cr>')
-- Fuzzy finder (fzf)
nmap('<C-f>', ':Rg<cr>')
-- NetRW
nnoremap('<S-w>', ':Ex<cr>')

View file

@ -1 +0,0 @@
require('rf')

View file

@ -1,20 +0,0 @@
local M = {}
local function bind(operation, outer_operations)
outer_operations = outer_operations or { noremap = true }
return function(l, r, o)
o = vim.tbl_extend('force',
outer_operations,
o or {}
)
vim.keymap.set(operation, l, r, o)
end
end
M.nmap = bind('n', { noremap = false })
M.nnoremap = bind('n')
M.vnoremap = bind('v')
M.xnoremap = bind('x')
M.inoremap = bind('i')
return M

View file

@ -1,2 +0,0 @@
require('rf.set')
require('rf.packer')

View file

@ -1,41 +0,0 @@
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
-- Packer
use 'wbthomason/packer.nvim'
-- Color theme/aesthetics
use 'beikome/cosme.vim'
use 'ajmwagar/vim-emoticons'
-- tpope
use 'tpope/vim-surround'
use 'tpope/vim-rails'
-- LSP
use 'neovim/nvim-lsp'
use 'neovim/nvim-lspconfig'
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-nvim-lsp'
use 'saadparwaiz1/cmp_luasnip'
use 'l3mon4d3/luasnip'
use 'onsails/lspkind.nvim'
-- Language specific
use 'groenewege/vim-less'
use 'vim-ruby/vim-ruby'
use 'fatih/vim-go'
use 'ocaml/vim-ocaml'
-- Others
use ('junegunn/fzf', { run = function() vim.fn['fzf#install'](0) end })
use 'junegunn/fzf.vim'
use 'ap/vim-css-color'
use 'jiangmiao/auto-pairs'
use 'docunext/closetag.vim'
if packer_bootstrap then
require('packer').sync()
end
end)

View file

@ -1,18 +0,0 @@
local set = vim.opt
set.nu = true
set.tabstop = 2
set.shiftwidth = 2
set.hlsearch = false
set.incsearch = true
set.smartindent = true
set.wrap = false
set.encoding = 'utf-8'
set.guifont = 'Iosevka Nerd Font Mono 14'
vim.cmd([[
set rtp^="home/rf/.opam/default/share/ocp-indent/vim"
]])
-- Lower update time the better (ms)
set.updatetime = 50

View file

@ -1,187 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
_G._packer = _G._packer or {}
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/rf/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/rf/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/rf/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/rf/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/rf/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["auto-pairs"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/auto-pairs",
url = "https://github.com/jiangmiao/auto-pairs"
},
["closetag.vim"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/closetag.vim",
url = "https://github.com/docunext/closetag.vim"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
cmp_luasnip = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["cosme.vim"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/cosme.vim",
url = "https://github.com/beikome/cosme.vim"
},
fzf = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/fzf",
url = "https://github.com/junegunn/fzf"
},
["fzf.vim"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/fzf.vim",
url = "https://github.com/junegunn/fzf.vim"
},
["lspkind.nvim"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
url = "https://github.com/onsails/lspkind.nvim"
},
luasnip = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/luasnip",
url = "https://github.com/l3mon4d3/luasnip"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lsp"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/nvim-lsp",
url = "https://github.com/neovim/nvim-lsp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["packer.nvim"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["vim-airline"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-airline",
url = "https://github.com/vim-airline/vim-airline"
},
["vim-airline-themes"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-airline-themes",
url = "https://github.com/vim-airline/vim-airline-themes"
},
["vim-buftabline"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-buftabline",
url = "https://github.com/ap/vim-buftabline"
},
["vim-css-color"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-css-color",
url = "https://github.com/ap/vim-css-color"
},
["vim-emoticons"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-emoticons",
url = "https://github.com/ajmwagar/vim-emoticons"
},
["vim-rails"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-rails",
url = "https://github.com/tpope/vim-rails"
},
["vim-surround"] = {
loaded = true,
path = "/home/rf/.local/share/nvim/site/pack/packer/start/vim-surround",
url = "https://github.com/tpope/vim-surround"
}
}
time([[Defining packer_plugins]], false)
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end