1
0
Fork 0

more nvim work

This commit is contained in:
Luca Bilke 2022-10-05 21:29:01 +02:00
parent b5b91a7a91
commit 3f55ab5502
4 changed files with 73 additions and 15 deletions

View file

@ -1,10 +1,28 @@
require('plugins')
require('keybinds')
require('theme')
require('bufferline').setup()
require('mason').setup()
require('bufferline').setup() -- TODO: only open when more than one buffer is open, remove exit button
require('mason').setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
require("mason-lspconfig").setup({
ensure_installed = { "sumneko_lua", "bashls", "clangd" },
automatic_installation = false
})
require('tokyonight').setup({
transparent = true,
terminal_colors = true,
dim_inactive = true,
lualine_bold = true,
})
vim.cmd[[colorscheme tokyonight]]
vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo"
vim.opt.clipboard = "unnamedplus"
vim.opt.conceallevel = 0
@ -49,3 +67,17 @@ for _, entry in ipairs(require('autocmds')) do
end
vim.api.nvim_create_autocmd(event, opts)
end
-- automatically set up language servers
-- local lspconfig = require('lspconfig')
-- local mason_registry = require('mason-registry')
-- lspconfig.util.default_config = vim.tbl_extend(
-- "force",
-- lspconfig.util.default_config,
-- {
-- on_attach = on_attach
-- }
-- )
-- for _, server in ipairs(require('mason-registry').get_installed_packages()) do
-- lspconfig[server.name].setup {}
-- end

View file

@ -2,11 +2,20 @@ local M = {}
vim.g.mapleader = "space"
function M.wk_setup()
end
function M.kb_setup()
function M.kb_setup(maps)
local options = { noremap = true }
for mode, binds in ipairs(maps) do
for _, bind in ipairs(binds) do
local key = bind[1]
local cmd = bind[2]
if entry[3] then
opts = rim.tbl_extend("force", options, bind[3])
end
vim.api.nvim_set_keymap(mode, key, cmd, opts)
end
end
end
return M

View file

@ -1,9 +0,0 @@
return function()
require("tokyonight").setup({
transparent = true,
terminal_colors = true,
dim_inactive = true,
lualine_bold = true,
})
vim.cmd[[colorscheme tokyonight]]
end

26
.config/nvim/lua/util.lua Normal file
View file

@ -0,0 +1,26 @@
local M = {}
vim.g.mapleader = "space"
local function map(maps)
local options = { noremap = true }
for mode, binds in ipairs(maps) do
for _, bind in ipairs(binds) do
local key = bind[1]
local cmd = bind[2]
if entry[3] then
opts = rim.tbl_extend("force", options, bind[3])
end
vim.api.nvim_set_keymap(mode, key, cmd, opts)
end
end
end
function M.wk_setup()
end
function M.kb_setup()
end
return M