81 lines
2.2 KiB
Lua
81 lines
2.2 KiB
Lua
local opt = vim.opt
|
|
|
|
opt.termguicolors = true
|
|
opt.relativenumber = true
|
|
opt.signcolumn = "yes"
|
|
vim.lsp.inlay_hint.enable = true
|
|
opt.tabstop = 8
|
|
vim.opt.expandtab = true
|
|
vim.g.tinted_background_transparent = 1
|
|
opt.swapfile = false
|
|
|
|
opt.shiftwidth = 8
|
|
vim.diagnostic.config({
|
|
virtual_text = {
|
|
spacing = 4,
|
|
source = true,
|
|
},
|
|
})
|
|
-- add plugins
|
|
vim.pack.add({
|
|
"https://github.com/tinted-theming/tinted-vim",
|
|
"https://github.com/neovim/nvim-lspconfig",
|
|
"https://github.com/nvim-treesitter/nvim-treesitter",
|
|
"https://github.com/vyfor/cord.nvim",
|
|
"https://github.com/nvim-mini/mini.nvim"
|
|
})
|
|
-- setup mini
|
|
require('mini.basics').setup()
|
|
require('mini.icons').setup()
|
|
require('mini.pick').setup()
|
|
|
|
-- function to set colorsceme
|
|
vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme"))
|
|
|
|
-- setup superior lsp
|
|
vim.lsp.config("qml-language-server", {
|
|
cmd = { "qml-language-server" },
|
|
filetypes = { "qml" },
|
|
root_markers = { { "qmldir", "shell.qml" }, ".git" },
|
|
})
|
|
vim.lsp.enable("lua_ls")
|
|
|
|
vim.lsp.enable("qml-language-server")
|
|
vim.lsp.enable("clangd")
|
|
vim.lsp.enable("lua-language-server")
|
|
require("cord").setup({
|
|
display = {
|
|
theme = "atom",
|
|
},
|
|
editor = { tooltip = "ur gay x3" },
|
|
})
|
|
|
|
|
|
-- keymaps
|
|
local map = vim.keymap.set
|
|
|
|
map("n", "<leader>ff", function()
|
|
MiniPick.builtin.files()
|
|
end)
|
|
map("n", "<leader>lg", function()
|
|
MiniPick.builtin.grep_live()
|
|
end)
|
|
|
|
map("n", "<C-h>", "<C-w>h")
|
|
map("n", "<C-j>", "<C-w>j")
|
|
map("n", "<C-k>", "<C-w>k")
|
|
map("n", "<C-l>", "<C-w>l")
|
|
map("n", "<C-S-Left>", ":vertical resize -5<CR>", { silent = true })
|
|
map("n", "<C-S-Right>", ":vertical resize +5<CR>", { silent = true })
|
|
map("n", "<C-S-Up>", ":resize +5<CR>", { silent = true })
|
|
map("n", "<C-S-Down>", ":resize -5<CR>", { silent = true })
|
|
-- lsp keybinds
|
|
map("n", "<C-f>", function()
|
|
vim.lsp.buf.format()
|
|
end)
|
|
|
|
-- util keybinds
|
|
map("n", "<leader>t", "<cmd> terminal <cr>")
|
|
map("n", "<A-t>", "<cmd>Lspsaga term_toggle<cr>")
|
|
map("t", "<esc>", "<c-\\><c-n>")
|
|
map("i", "<C-space>", vim.lsp.completion.get, { desc = "trigger autocompletion" })
|