Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ada736cef | |||
| 4bb0cf9488 | |||
| 6b9f3f8861 | |||
| a2a00851c9 | |||
| ad191099a1 | |||
| dac8b64323 | |||
| 1328081067 | |||
| 595ccc91f9 | |||
| bfed137052 | |||
| 2c5944f2c3 | |||
| 21c5121c50 | |||
| 1dab8545ce | |||
| 83827e5179 | |||
| 09b0a8ff4b | |||
| 98bb9ad4d4 | |||
| 19076813f3 | |||
| 24c567c5ed | |||
| 1f29896e48 | |||
| 440678afbd | |||
| 97576e96da | |||
| 44caa97803 |
3 changed files with 9 additions and 158 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1 @@
|
||||||
nvim-pack-lock.json
|
nvim-pack-lock.json
|
||||||
.luarc.json
|
|
||||||
|
|
|
||||||
8
.luarc.json
Normal file
8
.luarc.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"diagnostics.globals": [
|
||||||
|
"vim",
|
||||||
|
"Snacks",
|
||||||
|
"MiniStatusline",
|
||||||
|
"MiniPick"
|
||||||
|
]
|
||||||
|
}
|
||||||
157
init.lua
157
init.lua
|
|
@ -1,157 +0,0 @@
|
||||||
-- general options
|
|
||||||
local opt = vim.opt
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = "\\"
|
|
||||||
opt.number = true
|
|
||||||
opt.relativenumber = true
|
|
||||||
|
|
||||||
opt.cursorline = false
|
|
||||||
opt.termguicolors = true
|
|
||||||
opt.winborder = "rounded"
|
|
||||||
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.winborder = "single"
|
|
||||||
|
|
||||||
opt.shiftwidth = 8
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = {
|
|
||||||
spacing = 4,
|
|
||||||
source = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
-- add plugins
|
|
||||||
vim.pack.add({
|
|
||||||
"https://github.com/folke/snacks.nvim",
|
|
||||||
"https://github.com/nvim-lualine/lualine.nvim",
|
|
||||||
"https://github.com/tinted-theming/tinted-vim",
|
|
||||||
"https://github.com/nvimdev/lspsaga.nvim",
|
|
||||||
"https://github.com/neovim/nvim-lspconfig",
|
|
||||||
"https://github.com/nvim-treesitter/nvim-treesitter",
|
|
||||||
"https://github.com/vyfor/cord.nvim",
|
|
||||||
"https://github.com/mason-org/mason-lspconfig.nvim.git",
|
|
||||||
"https://github.com/mason-org/mason.nvim.git",
|
|
||||||
"https://github.com/Saghen/blink.cmp",
|
|
||||||
"https://github.com/saghen/blink.lib",
|
|
||||||
})
|
|
||||||
-- 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("qml-language-server")
|
|
||||||
vim.lsp.enable("clangd")
|
|
||||||
require("blink.cmp").setup({
|
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
|
||||||
completion = {
|
|
||||||
menu = {
|
|
||||||
auto_show = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
default = { "lsp", "path", "snippets", "buffer" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("mason").setup()
|
|
||||||
require("mason-lspconfig").setup()
|
|
||||||
require("snacks").setup({
|
|
||||||
notifier = { enabled = true },
|
|
||||||
statuscolumn = { enabled = true },
|
|
||||||
picker = {},
|
|
||||||
})
|
|
||||||
require("lspsaga").setup({
|
|
||||||
symbol_in_winbar = { enable = true },
|
|
||||||
lightbulb = {
|
|
||||||
enable = true,
|
|
||||||
sign = false,
|
|
||||||
},
|
|
||||||
hover = {
|
|
||||||
max_width = 0.6,
|
|
||||||
open_link = "gx",
|
|
||||||
open_browser = "!google-chrome",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("cord").setup({
|
|
||||||
display = {
|
|
||||||
theme = "atom",
|
|
||||||
},
|
|
||||||
editor = { tooltip = "ur gay x3" },
|
|
||||||
})
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
section_separators = { left = "", right = "" },
|
|
||||||
component_separators = { left = "|", right = "|" },
|
|
||||||
globalstatus = true,
|
|
||||||
always_divide_middle = true,
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { "mode" },
|
|
||||||
lualine_b = { "diagnostics" },
|
|
||||||
lualine_c = { "filename", "filesize", },
|
|
||||||
lualine_x = { "lsp_status", "filetype" },
|
|
||||||
lualine_y = { "" },
|
|
||||||
lualine_z = { "location" },
|
|
||||||
},
|
|
||||||
tabline = {
|
|
||||||
lualine_a = { { 'buffers', mode = 2, show_modified_status = true, } },
|
|
||||||
lualine_b = { 'branch' },
|
|
||||||
lualine_c = {},
|
|
||||||
lualine_x = {},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = { 'tabs' }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- keymaps
|
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map("n", "<leader>ff", function()
|
|
||||||
Snacks.picker.files()
|
|
||||||
end)
|
|
||||||
map("n", "<leader>lg", function()
|
|
||||||
Snacks.picker.grep()
|
|
||||||
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", "K", "<cmd> Lspsaga hover_doc<cr>")
|
|
||||||
map("n", "go", "<cmd> Lspsaga goto_definition<cr>")
|
|
||||||
map("n", "gr", "<cmd> Lspsaga finder<cr>")
|
|
||||||
map("n", "<leader>qf", "<cmd> Lspsaga code_action<cr>")
|
|
||||||
map("n", "<C-f>", function()
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end)
|
|
||||||
-- buffer keybinds
|
|
||||||
map("n", "<A-1>", "<cmd> LualineBuffersJump! 1 <cr>")
|
|
||||||
map("n", "<A-2>", "<cmd> LualineBuffersJump! 2 <cr>")
|
|
||||||
map("n", "<A-3>", "<cmd> LualineBuffersJump! 3 <cr>")
|
|
||||||
map("n", "<A-4>", "<cmd> LualineBuffersJump! 4 <cr>")
|
|
||||||
map("n", "<A-5>", "<cmd> LualineBuffersJump! 5 <cr>")
|
|
||||||
map("n", "<A-6>", "<cmd> LualineBuffersJump! 6 <cr>")
|
|
||||||
map("n", "<A-7>", "<cmd> LualineBuffersJump! 7 <cr>")
|
|
||||||
map("n", "<A-8>", "<cmd> LualineBuffersJump! 8 <cr>")
|
|
||||||
map("n", "<A-9>", "<cmd> LualineBuffersJump! 9 <cr>")
|
|
||||||
map("n", "<A-0>", "<cmd> LualineBuffersJump! last <cr>")
|
|
||||||
map("n", "<leader>w", "<cmd> bdelete! <cr>")
|
|
||||||
|
|
||||||
-- 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" })
|
|
||||||
|
|
||||||
1
init.lua
Symbolic link
1
init.lua
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../dotfiles/nvim/.config/nvim/init.lua
|
||||||
Loading…
Reference in a new issue