Compare commits

..

No commits in common. "d68a536a91edcbb557cdf420c1982931212f466c" and "ab4cc3e016930a089eec3ae5aa369ff531303a3d" have entirely different histories.

13 changed files with 40 additions and 272 deletions

View File

@ -1,41 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.workspace.library": [
"/home/leo/.config/nvim",
"/etc/xdg/nvim",
"/home/leo/.local/share/nvim/site",
"/home/leo/.local/share/nvim/site/pack/packer/start/auto-pairs",
"/home/leo/.local/share/nvim/site/pack/packer/start/black",
"/home/leo/.local/share/nvim/site/pack/packer/start/cder.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/coc.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/coq.artifacts",
"/home/leo/.local/share/nvim/site/pack/packer/start/coq.thirdparty",
"/home/leo/.local/share/nvim/site/pack/packer/start/coq_nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/dressing.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/lsp_lines.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/lualine.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/melange",
"/home/leo/.local/share/nvim/site/pack/packer/start/nginx.vim",
"/home/leo/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
"/home/leo/.local/share/nvim/site/pack/packer/start/nvim-mapper",
"/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
"/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter-refactor",
"/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
"/home/leo/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag",
"/home/leo/.local/share/nvim/site/pack/packer/start/packer.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/plenary.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/popup.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/telescope.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/undotree",
"/home/leo/.local/share/nvim/site/pack/packer/start/vgit.nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/vim-liquidsoap",
"/home/leo/.local/share/nvim/site/pack/packer/start/vim-matchup",
"/home/leo/.local/share/nvim/site/pack/packer/start/vim-maximizer",
"/home/leo/.local/share/nvim/site/pack/packer/start/zig.vim",
"/usr/share/nvim/runtime",
"/usr/lib/nvim",
"/home/leo/.local/share/nvim/site/pack/packer/start/vim-matchup/after",
"/usr/share/vim/vimfiles",
"${3rd}/luassert/library"
]
}

@ -1 +1 @@
Subproject commit 2495958aaf3f93581c87ec020164255e80655331
Subproject commit bc26a6a949f2e0d98b7bfc437d459b250900a165

View File

@ -1,4 +1,3 @@
vim.filetype.add({
extension = { ha = "hare" },
extension = { liq = "liquidsoap" }
})

View File

@ -93,10 +93,6 @@ require('config.treesitter')
require('config.lspconfig')
-- project.nvim
require('config.project_nvim')
-- Custom
Custom = require('config.custom')
@ -209,9 +205,3 @@ require('config.vgit')
-- coc
require('config.coc')
-- black
require('config.black')
-- structural search and replace
vim.keymap.set({ "n", "x" }, "<leader>sr", function() require("ssr").open() end)

View File

@ -1,6 +0,0 @@
vim.cmd([[
let g:black#settings = {
\ 'fast': 1,
\ 'line_length': 100
\}
]])

View File

@ -6,33 +6,18 @@ local configs = require('lspconfig.configs')
if not configs.harepls then
configs.harepls = {
default_config = {
cmd = { '/home/leo/code/hare/harepls/harepls' },
filetypes = { 'hare' },
cmd = { '/home/leo/code/hare/harepls/harepls' };
filetypes = { 'hare' };
root_dir = function(fname)
return nvim_lsp.util.find_git_ancestor(fname)
end,
settings = {},
},
end;
settings = {};
};
}
end
-- nvim_lsp.harepls.setup {}
require 'lspconfig'.rnix.setup {}
-- elixirls
if not configs.elixirls then
configs.elixirls = {
default_config = {
cmd = { '/usr/bin/elixir-ls' },
filetypes = { 'elixir' },
root_dir = function(fname)
return nvim_lsp.util.root_pattern("mix.exs", ".git")(fname) or vim.loop.os_homedir()
end,
}
}
end
-- keybindings
local on_attach = function(client, bufrn)
@ -59,7 +44,7 @@ local on_attach = function(client, bufrn)
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts, "LSP",
"remove_workspace_folder", "Remove workspace folder")
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts, "LSP"
, "list_workspace_folders", "List workspace folder")
, "list_workspace_folders", "List workspace folder")
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts, "LSP", "type_definition",
"Show type definition")
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts, "LSP", "rename", "Rename")
@ -72,11 +57,9 @@ local on_attach = function(client, bufrn)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts, "LSP", "goto_next", "Go to next")
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts, "LSP", "set_loclist",
"Set loclist")
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>', opts, "LSP", "formatting", "Format")
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts, "LSP", "formatting", "Format")
end
-- Launch language servers
local servers = {
'harepls',
@ -87,7 +70,7 @@ local servers = {
'tsserver',
'elixirls',
'dartls',
-- 'denols',
'denols',
'clangd',
'zls',
}
@ -119,7 +102,7 @@ local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
require 'lspconfig'.lua_ls.setup {
require 'lspconfig'.sumneko_lua.setup {
settings = {
Lua = {
runtime = {
@ -160,6 +143,4 @@ vim.keymap.set(
-- Format on save
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.format()]]
return servers
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]

View File

@ -1,32 +0,0 @@
local cmp = require('cmp')
cmp.setup({
snippet = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
['<C-Down>'] = cmp.mapping.scroll_docs(-4),
['<C-Up>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'vsnip' },
}, {
{ name = 'buffer' },
})
})
local servers = require('lspconfig')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
for _, server in ipairs(servers) do
require('lspconfig')[server].setup {
capabilities = capabilities
}
end

View File

@ -1 +0,0 @@
require("project_nvim").setup {}

View File

@ -23,26 +23,26 @@
-- let('g', 'airline_powerline_fonts ', 1)
-- github-theme
lualine_c = { function()
return vim.fn['nvim_treesitter#statusline'](90)
end }
lualine_c = {function()
return vim.fn['nvim_treesitter#statusline'](90)
end}
require('lualine').setup({
options = {
-- theme = "melange",
-- theme = "github"
-- section_separators = {'', ''},
-- component_separators = {'', ''}
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
-- lualine_c = {'filename'},
lualine_c = lualine_c,
lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
}
options = {
-- theme = "melange",
-- theme = "github"
-- section_separators = {'', ''},
-- component_separators = {'', ''}
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
-- lualine_c = {'filename'},
lualine_c = lualine_c,
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
}
})
-- require('github-theme').setup({

View File

@ -33,10 +33,11 @@ parser_config.hare = {
files = { "src/parser.c" },
-- optional entries:
-- branch = "main", -- default branch in case of git repo if different from master
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
},
filetype = "ha", -- if filetype does not match the parser name
filetype = "ha", -- if filetype does not match the parser name
}
vim.treesitter.language.register('hare', 'hare')
local ft_to_parser = require "nvim-treesitter.parsers".filetype_to_parsername
ft_to_parser.hare = "hare"

View File

@ -48,7 +48,6 @@ local function init()
-- use 'vim-airline/vim-airline-themes'
-- use 'projekt0n/github-nvim-theme'
-- use 'folke/tokyonight.nvim'
-- use 'ribru17/bamboo.nvim'
use 'savq/melange'
use {
'nvim-lualine/lualine.nvim',
@ -73,33 +72,9 @@ local function init()
use 'neovim/nvim-lspconfig'
use 'https://git.sr.ht/~whynothugo/lsp_lines.nvim'
-- -- Coq
use { 'ms-jpq/coq_nvim', branch = 'coq' }
use { 'ms-jpq/coq.artifacts', branch = 'artifacts' }
use { 'ms-jpq/coq.thirdparty', branch = '3p' }
-- -- nvim-cmp
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-vsnip'
use 'hrsh7th/vim-vsnip'
-- structural search and replace
use {
"cshuaimin/ssr.nvim",
module = "ssr",
-- Calling setup is optional.
config = function()
require("ssr").setup {
min_width = 50,
min_height = 5,
keymaps = {
close = "q",
next_match = "n",
prev_match = "N",
replace_all = "<leader><cr>",
},
}
end
}
use {'ms-jpq/coq_nvim', branch = 'coq'}
use {'ms-jpq/coq.artifacts', branch = 'artifacts'}
use {'ms-jpq/coq.thirdparty', branch = '3p'}
-- Split maximizer
use 'szw/vim-maximizer'
@ -115,7 +90,6 @@ local function init()
-- Black, python formatter
use 'psf/black'
-- use 'averms/black-nvim'
-- Autotag completer
use 'windwp/nvim-ts-autotag'
@ -133,21 +107,6 @@ local function init()
'nvim-lua/plenary.nvim'
}
}
-- liquidsoap syntax Highlight
use 'mcfiredrill/vim-liquidsoap'
-- go.nvim
-- use 'ray-x/go.nvim'
-- use 'ray-x/guihua.lua'
use {
"ahmedkhalf/project.nvim",
config = function()
end
}
-- RFC browser
use 'mhinz/vim-rfc'
end
local plugins = setmetatable({}, {

View File

@ -89,16 +89,6 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/cder.nvim",
url = "https://github.com/zane-/cder.nvim"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-vsnip"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/cmp-vsnip",
url = "https://github.com/hrsh7th/cmp-vsnip"
},
["coc.nvim"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/coc.nvim",
@ -109,11 +99,6 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/coq.artifacts",
url = "https://github.com/ms-jpq/coq.artifacts"
},
["coq.thirdparty"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/coq.thirdparty",
url = "https://github.com/ms-jpq/coq.thirdparty"
},
coq_nvim = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/coq_nvim",
@ -144,11 +129,6 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nginx.vim",
url = "https://github.com/chr4/nginx.vim"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
@ -201,20 +181,6 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/popup.nvim",
url = "https://github.com/nvim-lua/popup.nvim"
},
["project.nvim"] = {
config = { "\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0" },
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/project.nvim",
url = "https://github.com/ahmedkhalf/project.nvim"
},
["ssr.nvim"] = {
config = { "\27LJ\2\nŸ\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0005\3\4\0=\3\5\2B\0\2\1K\0\1\0\fkeymaps\1\0\4\16replace_all\17<leader><cr>\15prev_match\6N\15next_match\6n\nclose\6q\1\0\2\14min_width\0032\15min_height\3\5\nsetup\bssr\frequire\0" },
loaded = false,
needs_bufread = false,
only_cond = false,
path = "/home/leo/.local/share/nvim/site/pack/packer/opt/ssr.nvim",
url = "https://github.com/cshuaimin/ssr.nvim"
},
["telescope.nvim"] = {
config = { "\27LJ\2\nh\0\0\3\0\5\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\4\0B\0\2\1K\0\1\0\tcder\vmapper\19load_extension\14telescope\frequire\0" },
loaded = true,
@ -231,11 +197,6 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vgit.nvim",
url = "https://github.com/tanvirtin/vgit.nvim"
},
["vim-liquidsoap"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-liquidsoap",
url = "https://github.com/mcfiredrill/vim-liquidsoap"
},
["vim-matchup"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-matchup",
@ -246,16 +207,6 @@ _G.packer_plugins = {
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-maximizer",
url = "https://github.com/szw/vim-maximizer"
},
["vim-rfc"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-rfc",
url = "https://github.com/mhinz/vim-rfc"
},
["vim-vsnip"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-vsnip",
url = "https://github.com/hrsh7th/vim-vsnip"
},
["zig.vim"] = {
loaded = true,
path = "/home/leo/.local/share/nvim/site/pack/packer/start/zig.vim",
@ -264,46 +215,14 @@ _G.packer_plugins = {
}
time([[Defining packer_plugins]], false)
local module_lazy_loads = {
["^ssr"] = "ssr.nvim"
}
local lazy_load_called = {['packer.load'] = true}
local function lazy_load_module(module_name)
local to_load = {}
if lazy_load_called[module_name] then return nil end
lazy_load_called[module_name] = true
for module_pat, plugin_name in pairs(module_lazy_loads) do
if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then
to_load[#to_load + 1] = plugin_name
end
end
if #to_load > 0 then
require('packer.load')(to_load, {module = module_name}, _G.packer_plugins)
local loaded_mod = package.loaded[module_name]
if loaded_mod then
return function(modname) return loaded_mod end
end
end
end
if not vim.g.packer_custom_loader_enabled then
table.insert(package.loaders, 1, lazy_load_module)
vim.g.packer_custom_loader_enabled = true
end
-- Config for: project.nvim
time([[Config for project.nvim]], true)
try_loadstring("\27LJ\2\n\v\0\0\1\0\0\0\1K\0\1\0\0", "config", "project.nvim")
time([[Config for project.nvim]], false)
-- Config for: nvim-mapper
time([[Config for nvim-mapper]], true)
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper")
time([[Config for nvim-mapper]], false)
-- Config for: telescope.nvim
time([[Config for telescope.nvim]], true)
try_loadstring("\27LJ\2\nh\0\0\3\0\5\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\0016\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\4\0B\0\2\1K\0\1\0\tcder\vmapper\19load_extension\14telescope\frequire\0", "config", "telescope.nvim")
time([[Config for telescope.nvim]], false)
-- Config for: nvim-mapper
time([[Config for nvim-mapper]], true)
try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper")
time([[Config for nvim-mapper]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then

View File

@ -1 +0,0 @@
../deps/tree-sitter-hare/queries