Skip to content

Commit

Permalink
changex
Browse files Browse the repository at this point in the history
  • Loading branch information
mbalazy committed Oct 1, 2022
1 parent 196d511 commit 893d01f
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 105 deletions.
208 changes: 105 additions & 103 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lvim.leader = "space"

lvim.colorscheme = "onedark"
require("onedark").setup({
style = "deep",
style = "deep",
})

lvim.builtin.terminal.active = true
Expand All @@ -26,124 +26,126 @@ lvim.builtin.telescope.defaults.selection_caret = ">"
lvim.builtin.telescope.defaults.layout_config.width = 0.9
lvim.builtin.telescope.defaults.file_ignore_patterns = { "NvimTree", "node_modules", ".yarn" }

lvim.lsp.automatic_servers_installation = false

-- automatically close the tab/vim when nvim-tree is the last window in the tab
vim.api.nvim_create_autocmd("BufEnter", {
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
vim.cmd("quit")
end
end,
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
vim.cmd("quit")
end
end,
})

-- load snippets
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "./snippets/package.json" } })
-- require("luasnip.loaders.from_vscode").lazy_load({ paths = { "./snippets/package.json" } })

require("linters")
require("which")
require("lspTs")
require("cmpMappings")

lvim.plugins = {
{
"nvim-telescope/telescope-file-browser.nvim",
},

{
"SmiteshP/nvim-gps",
requires = "nvim-treesitter/nvim-treesitter",
},
{
"navarasu/onedark.nvim",
},
{
"jose-elias-alvarez/nvim-lsp-ts-utils",
},
{ "tpope/vim-surround" },
{ "lukas-reineke/indent-blankline.nvim" },
{
"windwp/nvim-ts-autotag",
event = "InsertEnter",
},
{
"p00f/nvim-ts-rainbow",
},
{ "Pocco81/DAPInstall.nvim", branch = "dev" },
{ "David-Kunz/jester" },
{ "rcarriga/nvim-dap-ui" },
{
"rmagatti/auto-session",
config = function()
require("auto-session").setup({
log_level = "info",
})
end,
},
{
"nvim-telescope/telescope-file-browser.nvim",
},

{
"SmiteshP/nvim-gps",
requires = "nvim-treesitter/nvim-treesitter",
},
{
"navarasu/onedark.nvim",
},
{
"jose-elias-alvarez/nvim-lsp-ts-utils",
},
{ "tpope/vim-surround" },
{ "lukas-reineke/indent-blankline.nvim" },
{
"windwp/nvim-ts-autotag",
event = "InsertEnter",
},
{
"p00f/nvim-ts-rainbow",
},
-- { "Pocco81/DAPInstall.nvim", branch = "dev" },
{ "David-Kunz/jester" },
-- { "rcarriga/nvim-dap-ui" },
{
"rmagatti/auto-session",
config = function()
require("auto-session").setup({
log_level = "info",
})
end,
},
}

require("indent_blankline").setup({
filetype = { "yaml", "yml" },
show_current_context = false,
show_trailing_blankline_indent = false,
filetype = { "yaml", "yml" },
show_current_context = false,
show_trailing_blankline_indent = false,
})

-- debugging
lvim.builtin.dap.active = true
local dap = require("dap")

require("dap").set_log_level("TRACE")
require("dapui").setup()

dap.adapters.node2 = {
type = "executable",
command = "node",
args = { "~/.local/share/nvim/dapinstall/jsnode/vscode-node-debug2/out/src/nodeDebug.js" },
}

dap.configurations.typescript = {
{
type = "node2",
request = "launch",
-- program = "${workspaceFolder}/${file}",
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = "inspector",
console = "integratedTerminal",
},
}

dap.configurations.javascript = {
{
type = "node2",
request = "launch",
-- program = "${workspaceFolder}/${file}",
cwd = vim.fn.getcwd(),
sourceMaps = true,
protocol = "inspector",
console = "integratedTerminal",
},
}

local dap_install = require("dap-install")

dap_install.setup({
installation_path = vim.fn.stdpath("data") .. "/dapinstall/",
verbosely_call_debuggers = true,
})

local dapui = require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end

dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end

local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers()
for _, debugger in ipairs(dbg_list) do
dap_install.config(debugger)
end
-- local dap = require("dap")

-- require("dap").set_log_level("TRACE")
-- require("dapui").setup()

-- dap.adapters.node2 = {
-- type = "executable",
-- command = "node",
-- args = { "~/.local/share/nvim/dapinstall/jsnode/vscode-node-debug2/out/src/nodeDebug.js" },
-- }

-- dap.configurations.typescript = {
-- {
-- type = "node2",
-- request = "launch",
-- -- program = "${workspaceFolder}/${file}",
-- cwd = vim.fn.getcwd(),
-- sourceMaps = true,
-- protocol = "inspector",
-- console = "integratedTerminal",
-- },
-- }

-- dap.configurations.javascript = {
-- {
-- type = "node2",
-- request = "launch",
-- -- program = "${workspaceFolder}/${file}",
-- cwd = vim.fn.getcwd(),
-- sourceMaps = true,
-- protocol = "inspector",
-- console = "integratedTerminal",
-- },
-- }

-- local dap_install = require("dap-install")

-- dap_install.setup({
-- installation_path = vim.fn.stdpath("data") .. "/dapinstall/",
-- verbosely_call_debuggers = true,
-- })

-- local dapui = require("dapui")
-- dap.listeners.after.event_initialized["dapui_config"] = function()
-- dapui.open()
-- end

-- dap.listeners.before.event_terminated["dapui_config"] = function()
-- dapui.close()
-- end
-- dap.listeners.before.event_exited["dapui_config"] = function()
-- dapui.close()
-- end

-- local dbg_list = require("dap-install.api.debuggers").get_installed_debuggers()
-- for _, debugger in ipairs(dbg_list) do
-- dap_install.config(debugger)
-- end
3 changes: 3 additions & 0 deletions lua/cmpMappings.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
local cmp = require("cmp")

lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"

cmp.setup({
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
Expand Down
4 changes: 2 additions & 2 deletions lua/which.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ lvim.builtin.which_key.mappings.b.e = nil
lvim.builtin.which_key.mappings.b.j = { "<cmd>BufferLineCloseLeft<cr>", "Close all buffers to the left" }
lvim.builtin.which_key.mappings.b.k = { "<cmd>BufferLineCloseRight<cr>", "Close all buffers to the right" }

-- lvim.builtin.which_key.mappings.b.l = { "<cmd>BufferLineCyclePrev<cr>", "Move buffer next" }
-- lvim.builtin.which_key.mappings.b.h = { "<cmd>BufferMovePrev<cr>", "Move buffer prev" }
lvim.builtin.which_key.mappings.b.h = { "<cmd>BufferLineMovePrev<cr>", "Move buffer prev" }
lvim.builtin.which_key.mappings.b.l = { "<cmd>BufferLineMoveNext<cr>", "Move buffer next" }

-- Treesitter
lvim.builtin.which_key.mappings["T"] = {
Expand Down

0 comments on commit 893d01f

Please sign in to comment.