Restructuring
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
-- https://github.com/stevearc/aerial.nvim
|
||||
|
||||
require("aerial").setup({
|
||||
layout = {
|
||||
min_width = 40,
|
||||
placement = "edge",
|
||||
},
|
||||
disable_max_size = 10000000,
|
||||
highlight_on_hover = true,
|
||||
ignore = {
|
||||
unlisted_buffers = true,
|
||||
},
|
||||
on_attach = function (bufnr)
|
||||
-- Toggle the aerial window with <leader>a
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<leader>at", "<cmd>AerialToggle!<CR>", {})
|
||||
-- Jump forwards/backwards with '{' and '}'
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "{", "<cmd>AerialPrev<CR>", {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "}", "<cmd>AerialNext<CR>", {})
|
||||
-- Jump up the tree with '[[' or ']]'
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "[[", "<cmd>AerialPrevUp<CR>", {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "]]", "<cmd>AerialNextUp<CR>", {})
|
||||
end,
|
||||
show_guides = true,
|
||||
})
|
||||
@@ -1,6 +0,0 @@
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>q",
|
||||
":Bwipeout<CR>",
|
||||
{ remap = false, silent = true, }
|
||||
)
|
||||
+17
-4
@@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
local module_name = "lsp"
|
||||
local package_name = "lsp"
|
||||
local utils = require("utils")
|
||||
|
||||
local P = {}
|
||||
@@ -24,7 +24,20 @@ P._language_servers = nil
|
||||
|
||||
P.capabilities = {}
|
||||
|
||||
P.servers = require("lsp.servers")
|
||||
P.servers = {
|
||||
bashls = {},
|
||||
clangd = {},
|
||||
cmake = {},
|
||||
diagnosticls = {},
|
||||
groovyls = {},
|
||||
jedi_language_server = {},
|
||||
lemminx = {},
|
||||
lua_ls = {},
|
||||
}
|
||||
|
||||
for name, _ in pairs(P.servers) do
|
||||
P.servers[name] = require("lsp.config." .. name)
|
||||
end
|
||||
|
||||
function P._setup_diagnostic()
|
||||
vim.diagnostic.config({
|
||||
@@ -275,7 +288,7 @@ function P.language_servers(self)
|
||||
name,
|
||||
table.concat(not_installed, ", ")
|
||||
),
|
||||
module_name
|
||||
package_name
|
||||
)
|
||||
server.enabled = false
|
||||
goto next_server
|
||||
@@ -296,7 +309,7 @@ function P.language_servers(self)
|
||||
name,
|
||||
table.concat(not_installed, ", ")
|
||||
),
|
||||
module_name
|
||||
package_name
|
||||
)
|
||||
server.enabled = false
|
||||
goto next_server
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
--[[
|
||||
Copyright 2023 Oscar Wallberg
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
]]
|
||||
|
||||
local servers = {
|
||||
"bashls",
|
||||
"clangd",
|
||||
"cmake",
|
||||
"diagnosticls",
|
||||
"groovyls",
|
||||
"jedi_language_server",
|
||||
"lemminx",
|
||||
"lua_ls",
|
||||
}
|
||||
|
||||
local manifest = {}
|
||||
|
||||
for _, name in ipairs(servers) do
|
||||
manifest[name] = require("lsp.servers." .. name)
|
||||
end
|
||||
|
||||
return manifest
|
||||
@@ -20,8 +20,8 @@ vim.fn.execute("nnoremap <silent> <F5> :lua require'dap'.continue()<CR>")
|
||||
vim.fn.execute("nnoremap <silent> <F10> :lua require'dap'.step_over()<CR>")
|
||||
vim.fn.execute("nnoremap <silent> <F11> :lua require'dap'.step_into()<CR>")
|
||||
vim.fn.execute("nnoremap <silent> <F12> :lua require'dap'.step_out()<CR>")
|
||||
vim.fn.execute("nnoremap <leader>dt :lua require'config.dap'.pytest({'-k', ''})<left><left><left>")
|
||||
vim.fn.execute("nnoremap <leader>dl :lua require'config.dap'.launch({''})<left><left><left>")
|
||||
vim.fn.execute("nnoremap <leader>dt :lua require'plugin.config.dap'.pytest({'-k', ''})<left><left><left>")
|
||||
vim.fn.execute("nnoremap <leader>dl :lua require'plugin.config.dap'.launch({''})<left><left><left>")
|
||||
vim.fn.execute("nnoremap <silent> <leader>db :lua require'dap'.toggle_breakpoint()<CR>")
|
||||
-- vim.fn.execute("nnoremap <silent> <leader>B :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>")
|
||||
-- vim.fn.execute("nnoremap <silent> <leader>lp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<CR>")
|
||||
@@ -21,26 +21,26 @@ local plugins = {
|
||||
"Mofiqul/vscode.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
config = function () require("config.vscode") end,
|
||||
config = function () require("plugin.config.vscode") end,
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
priority = 900,
|
||||
config = function () require("config.notify") end,
|
||||
config = function () require("plugin.config.notify") end,
|
||||
},
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function () require("config.luasnip") end,
|
||||
config = function () require("plugin.config.luasnip") end,
|
||||
-- comment out on windows and install jsregexp manually
|
||||
build = "make install_jsregexp",
|
||||
version = "2.*",
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function () require("config.autopairs") end,
|
||||
config = function () require("plugin.config.autopairs") end,
|
||||
},
|
||||
{
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
@@ -59,23 +59,23 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function () require("config.cmp") end,
|
||||
config = function () require("plugin.config.cmp") end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function () require("config.mason") end,
|
||||
config = function () require("plugin.config.mason") end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function () require("config.mason_lspconfig") end,
|
||||
config = function () require("plugin.config.mason_lspconfig") end,
|
||||
},
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function () require("config.lsp_signature") end,
|
||||
config = function () require("plugin.config.lsp_signature") end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
@@ -85,42 +85,42 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function () require("config.treesitter") end,
|
||||
config = function () require("plugin.config.treesitter") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function () require("config.dap") end,
|
||||
config = function () require("plugin.config.dap") end,
|
||||
lazy = true,
|
||||
ft = require("lsp"):filetypes(),
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
config = function () require("config.dap_ui") end,
|
||||
config = function () require("plugin.config.dap_ui") end,
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
},
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
config = function () require("config.fugitive") end,
|
||||
config = function () require("plugin.config.fugitive") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"rbong/vim-flog",
|
||||
config = function () require("config.flog") end,
|
||||
config = function () require("plugin.config.flog") end,
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function () require("config.lualine") end,
|
||||
config = function () require("plugin.config.lualine") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
config = function () require("config.bufferline") end,
|
||||
config = function () require("plugin.config.bufferline") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
@@ -129,37 +129,37 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function () require("config.gitsigns") end,
|
||||
config = function () require("plugin.config.gitsigns") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function () require("config.telescope") end,
|
||||
config = function () require("plugin.config.telescope") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function () require("config.comment") end,
|
||||
config = function () require("plugin.config.comment") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"Yggdroot/indentLine",
|
||||
config = function () require("config.indentLine") end,
|
||||
config = function () require("plugin.config.indentLine") end,
|
||||
lazy = true,
|
||||
event = "VimEnter",
|
||||
},
|
||||
{
|
||||
"simeji/winresizer",
|
||||
config = function () require("config.winresizer") end,
|
||||
config = function () require("plugin.config.winresizer") end,
|
||||
lazy = true,
|
||||
keys = { "<C-W>r", },
|
||||
},
|
||||
{
|
||||
"sindrets/winshift.nvim",
|
||||
config = function () require("config.winshift") end,
|
||||
config = function () require("plugin.config.winshift") end,
|
||||
lazy = true,
|
||||
keys = { "<C-W>m", },
|
||||
},
|
||||
@@ -170,7 +170,7 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
config = function () require("config.tree") end,
|
||||
config = function () require("plugin.config.tree") end,
|
||||
},
|
||||
{
|
||||
"dstein64/vim-startuptime",
|
||||
@@ -179,20 +179,20 @@ local plugins = {
|
||||
},
|
||||
{
|
||||
"stevearc/aerial.nvim",
|
||||
config = function () require("config.aerial") end,
|
||||
config = function () require("plugin.config.aerial") end,
|
||||
},
|
||||
{
|
||||
"nvim-neorg/neorg",
|
||||
build = ":Neorg sync-parsers",
|
||||
config = function () require("config.neorg") end,
|
||||
config = function () require("plugin.config.neorg") end,
|
||||
},
|
||||
{
|
||||
"RubixDev/mason-update-all",
|
||||
config = function () require("config.mason_update_all") end,
|
||||
config = function () require("plugin.config.mason_update_all") end,
|
||||
},
|
||||
{
|
||||
"famiu/bufdelete.nvim",
|
||||
config = function () require("config.bufdelete") end,
|
||||
config = function () require("plugin.config.bufdelete") end,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user