Compare commits
30 Commits
98d1b6dc8c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6fdfbd74cf | |||
| a31a975a98 | |||
| 95e4b5750b | |||
| ee32923a3c | |||
| 3b0e43f2f9 | |||
| 0d2fe89b90 | |||
| 32d8426cb2 | |||
| 78f42f8523 | |||
| ea27ecbe14 | |||
| 57bc357f84 | |||
| 54efc70083 | |||
| 5fc86a5c65 | |||
| 2e1a6a23c2 | |||
| 23b911e176 | |||
| c5a11347b2 | |||
| 36c2767bfc | |||
| d7a2563550 | |||
| bc354eb60a | |||
| ce0eed7a96 | |||
| 14282b6c18 | |||
| 69e929674f | |||
| 67384ac2e0 | |||
| 9a44de03ae | |||
| e25dc486a3 | |||
| 1c30f6c3a7 | |||
| 73b97e50f3 | |||
| ab443628f3 | |||
| 0895ff44af | |||
| a47c982112 | |||
| 11183fed19 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
spell/
|
||||
.obsidian_vaults
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"diagnostics.disable": [
|
||||
"unused-local"
|
||||
"unused-local",
|
||||
"redundant-return-value"
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# nvim-config
|
||||
My personal [Neovim](https://github.com/neovim/neovim) configuration.
|
||||
|
||||
Theme: [Dracula](https://github.com/Mofiqul/dracula.nvim)
|
||||
Theme: [Catppuccin Mocha](https://github.com/catppuccin/nvim)
|
||||
|
||||
@@ -1,47 +1,48 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
|
||||
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
|
||||
"blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" },
|
||||
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
|
||||
"blink.cmp": { "branch": "main", "commit": "485c03400608cb6534bbf84da8c1c471fc4808c0" },
|
||||
"catppuccin": { "branch": "main", "commit": "f19cab18ec4dc86d415512c7a572863b2adbcc18" },
|
||||
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dracula": { "branch": "main", "commit": "515acae4fd294fcefa5b15237a333c2606e958d1" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "56ef6a969a4990d938c5fed40c370f65e125fc97" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "234a9d4022d0a17301e85a08660d489bffb7383f" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "9b36d497495436c135659902054ee637e0ba6021" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7527af40ddd4a93a02911be570b32609b9d4ea53" },
|
||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "613df2830d7faeae7483ba2e736683154b95921e" },
|
||||
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
|
||||
"neogen": { "branch": "main", "commit": "dd0301bfba1f83a3bc009b5430fce7aa3cee6941" },
|
||||
"noice.nvim": { "branch": "main", "commit": "e3c68a4d2275a01268a52e2931bfccfbfb693d15" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ead2fbc4893fdd062e1dd0842679a48bfb7bac5c" },
|
||||
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "ddd7383e856a7c939cb4f5143278fe041bbb8cb9" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "65b7399804315a1160933b64292d3c5330aa4e9f" },
|
||||
"fzf-lua": { "branch": "main", "commit": "3776d03a4afa967bd6c4b7f78e9e90bc21425236" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a1067cf84b4ff81b66d2bf4d01f4cbdb5de40bd0" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "8af2569a7d7fd37300dfa760e44e71efbbf322fd" },
|
||||
"mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" },
|
||||
"neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ef73a4f2a1ddf0439eb97b46de2aab265ddba1cd" },
|
||||
"nvim-navic": { "branch": "master", "commit": "f887d794a0f4594882814d7780980a949200a238" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
|
||||
"nvim-tree-docs": { "branch": "master", "commit": "5db023d783da1e55339e5e25caaf72a59597e626" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "7e3942ceca9e0c28760f77ac33bc16399146d879" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1c9136332840edee0c593f2f4f89598c8ed97f5f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||
"oil.nvim": { "branch": "master", "commit": "add50252b5e9147c0a09d36480d418c7e2737472" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "1ba6fb7998985736ca3480366c9792be05b93ad7" },
|
||||
"tailwind-tools.nvim": { "branch": "master", "commit": "0862805c3c0d8a8d61ec1baffc79b9fbf5578d82" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
||||
"oil.nvim": { "branch": "master", "commit": "07f80ad645895af849a597d1cac897059d89b686" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "67f2c7c8850bb11eefa6b22054a6f4cef1146de2" },
|
||||
"tailwind-tools.nvim": { "branch": "master", "commit": "fbe982901d4508b0dcd80e07addf0fcb6dab6c49" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "51f548421f8a74680eff27d283c9d5ea6e8d0074" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "6f380b8826fb819c752c8fd7daaee9ef96d4c689" },
|
||||
"tsc.nvim": { "branch": "main", "commit": "59abb6f3f24a3ca80708f694af4e2b727a1a3211" },
|
||||
"undotree": { "branch": "master", "commit": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "c7f1be21a08b8fc9d927a19db89a4aa995402787" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "f4d37b7312ae6489e5c04bee654ca521baac188a" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "d74a7cff4cfcf84f83cc7eccfa365488f3bbabc2" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f176232e7759c4f8abd923c21e3e5a5c76cd6837" },
|
||||
"tsc.nvim": { "branch": "main", "commit": "8c1b4ec6a48d038a79ced8674cb15e7db6dd8ef0" },
|
||||
"undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "e8b53c0f3aa6e6127ac2a2d2071d9aade6c6e373" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"vim-pencil": { "branch": "master", "commit": "6d70438a8886eaf933c38a7a43a61adb0a7815ed" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "d847ea942a5bb4d4fab6efebc9f30d787fd96e65" }
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }
|
||||
}
|
||||
|
||||
@@ -14,5 +14,8 @@ vim.api.nvim_create_autocmd({ "TextChanged" }, {
|
||||
-- This updates the LSP diagnostics
|
||||
vim.cmd("startinsert")
|
||||
vim.cmd("stopinsert")
|
||||
|
||||
local pos = vim.api.nvim_win_get_cursor(0)
|
||||
vim.api.nvim_win_set_cursor(0, pos)
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -5,6 +5,7 @@ function M.setup()
|
||||
require("409.remap")
|
||||
require("409.lazy")
|
||||
require("409.autocmd")
|
||||
require("409.lsp")
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
223
lua/409/lsp.lua
Normal file
223
lua/409/lsp.lua
Normal file
@@ -0,0 +1,223 @@
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
update_in_insert = true,
|
||||
float = {
|
||||
border = "single",
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(event)
|
||||
local bufnr = event.buf
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
|
||||
if not client then
|
||||
return
|
||||
end
|
||||
|
||||
if vim.bo[bufnr].filetype == "markdown" then
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.hl", "hypr*.conf" },
|
||||
callback = function(e)
|
||||
vim.lsp.start({
|
||||
name = "hyprlang",
|
||||
cmd = { "hyprls" },
|
||||
root_dir = vim.fn.getcwd(),
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
local lsp_opts = { buffer = bufnr, remap = false }
|
||||
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition({
|
||||
on_list = function(list)
|
||||
vim.lsp.util.show_document(list.items[1].user_data, "utf-8", { focus = true })
|
||||
end,
|
||||
})
|
||||
end, { buffer = bufnr, remap = false, nowait = true })
|
||||
vim.keymap.set("n", "gi", function()
|
||||
vim.lsp.buf.implementation({
|
||||
on_list = function(list)
|
||||
vim.lsp.util.show_document(list.items[1].user_data, "utf-8", { focus = true })
|
||||
end,
|
||||
})
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vws", function()
|
||||
vim.lsp.buf.workspace_symbol()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vd", function()
|
||||
vim.diagnostic.open_float()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "[d", function()
|
||||
vim.diagnostic.jump({ count = 1 })
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "]d", function()
|
||||
vim.diagnostic.jump({ count = -1 })
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<c-m>", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vrr", function()
|
||||
vim.lsp.buf.references()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function()
|
||||
vim.lsp.buf.rename()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("i", "<C-h>", function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, lsp_opts)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.lsp.config.tailwindcss = {
|
||||
filetypes_exclude = { "markdown", "rust", "proto", "sh", "gitignore", "toml", "json", "fugitive" },
|
||||
hovers = true,
|
||||
suggestions = true,
|
||||
root_dir = function(fname)
|
||||
local root_pattern = require("lspconfig").util.root_pattern(
|
||||
"tailwind.config.cjs",
|
||||
"talwind.config.js",
|
||||
"tailwind.config.ts",
|
||||
"postcss.config.js",
|
||||
"postcss.config.ts"
|
||||
)
|
||||
|
||||
return root_pattern(fname)
|
||||
end,
|
||||
}
|
||||
|
||||
vim.lsp.config.vtsls = {
|
||||
filetypes = {
|
||||
"svelte",
|
||||
"vue",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
},
|
||||
settings = {
|
||||
vtsls = {
|
||||
ts_ls = {
|
||||
globalPlugins = {
|
||||
{
|
||||
name = "typescript-svelte-plugin",
|
||||
location = vim.fn.getcwd() .. "/node_modules/typescript-svelte-plugin",
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
{
|
||||
name = "typescript-svelte-plugin",
|
||||
location = vim.fn.getcwd() .. "/node_modules/typescript-svelte-plugin",
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = vim.fn.expand("$MASON/packages")
|
||||
.. "/vue-language-server"
|
||||
.. "/node_modules/@vue/language-server",
|
||||
languages = { "vue" },
|
||||
configNamespace = "typescript",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
typescript = {
|
||||
preferences = {
|
||||
quoteStyle = "single",
|
||||
},
|
||||
updateImportsOnFileMove = {
|
||||
enabled = "always",
|
||||
},
|
||||
suggest = {
|
||||
completeFunctionCalls = true,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
preferences = {
|
||||
quoteStyle = "single",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.lsp.config.vue_ls = {
|
||||
on_init = function(client)
|
||||
client.handlers["tsserver/request"] = function(_, result, context)
|
||||
local clients = vim.lsp.get_clients({ bufnr = context.bufnr, name = "vtsls" })
|
||||
if #clients == 0 then
|
||||
vim.notify(
|
||||
"Could not found `vtsls` lsp client, vue_lsp would not work without it.",
|
||||
vim.log.levels.ERROR
|
||||
)
|
||||
return
|
||||
end
|
||||
local ts_client = clients[1]
|
||||
|
||||
local param = unpack(result)
|
||||
local id, command, payload = unpack(param)
|
||||
ts_client:exec_cmd({
|
||||
title = "vue_request_forward", -- You can give title anything as it's used to represent a command in the UI, `:h Client:exec_cmd`
|
||||
command = "typescript.tsserverRequest",
|
||||
arguments = {
|
||||
command,
|
||||
payload,
|
||||
},
|
||||
}, { bufnr = context.bufnr }, function(_, r)
|
||||
local response_data = { { id, r.body } }
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
client:notify("tsserver/response", response_data)
|
||||
end)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
vim.lsp.config.svelte = {
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = { dynamicRegistration = true },
|
||||
},
|
||||
},
|
||||
on_attach = function(client)
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = { "*.svelte", "*.js", "*.ts" },
|
||||
group = vim.api.nvim_create_augroup("svelte_ondidchangetsorjsfile", { clear = true }),
|
||||
callback = function(ctx)
|
||||
client.notify(client, "$/onDidChangeTsOrJsFile", { uri = ctx.match })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
vim.lsp.config.cssls = {
|
||||
settings = {
|
||||
css = {
|
||||
lint = {
|
||||
unknownAtRules = "ignore",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.lsp.config.sourcekit = {
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = {
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.lsp.enable("sourcekit")
|
||||
@@ -15,6 +15,7 @@ return {
|
||||
["<C-j>"] = { "scroll_documentation_down", "fallback" },
|
||||
},
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono",
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
@@ -50,7 +51,15 @@ return {
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "buffer" },
|
||||
default = { "lsp", "lazydev", "path", "buffer" },
|
||||
providers = {
|
||||
lazydev = {
|
||||
name = "LazyDev",
|
||||
module = "lazydev.integrations.blink",
|
||||
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||
score_offset = 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
accept = {
|
||||
@@ -63,9 +72,14 @@ return {
|
||||
border = "single",
|
||||
draw = {
|
||||
padding = 2,
|
||||
columns = { { "kind_icon" }, { "label" }, { "kind" } },
|
||||
|
||||
columns = { { "kind_icon" }, { "label" }, { "label_description" }, { "kind" } },
|
||||
components = {
|
||||
label_description = {
|
||||
width = { max = 50 },
|
||||
text = function(ctx)
|
||||
return ctx.label_detail
|
||||
end,
|
||||
},
|
||||
kind = {
|
||||
text = function(ctx)
|
||||
return "(" .. ctx.kind .. ")"
|
||||
@@ -108,46 +122,12 @@ return {
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
config = function(_, opts)
|
||||
require("blink.cmp").setup(opts)
|
||||
local blink = require("blink.cmp")
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpMenu", { fg = "#abb2bf", bg = "none" })
|
||||
blink.setup(opts)
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpMenuBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpDocBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpSignatureHelpBorder", { link = "FloatBorder" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpLabelMatch", { fg = "#50fa7b", bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpLabel", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpMenuSelection", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKind", { link = "BlinkCmpLabel" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpGhostText", { fg = "#abb2bf" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindTypeParameter", { link = "@variable.parameter" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindConstructor", { link = "@type" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindEnumMember", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindReference", { link = "@variable.parameter.reference" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindInterface", { link = "@type" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindVariable", { link = "@variable" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindProperty", { link = "@property" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindOperator", { link = "@operator" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindFunction", { link = "@function" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindConstant", { link = "@constant" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindSnippet", { link = "@markup" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindKeyword", { link = "@keyword" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindStruct", { link = "@structure" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindModule", { link = "@module" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindMethod", { link = "@function.method" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindFolder", { link = "TSURI" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindValue", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindField", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindEvent", { link = "@constant" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindColor", { link = "DevIconCss" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindClass", { link = "@type" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindUnit", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindText", { link = "@markup" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindFile", { link = "TSURI" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindEnum", { link = "@variable.member" })
|
||||
local capabilities = blink.get_lsp_capabilities()
|
||||
vim.lsp.config("*", { capabilities = capabilities })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,9 +13,11 @@ return {
|
||||
typescriptreact = { "prettierd" },
|
||||
css = { "prettierd" },
|
||||
svelte = { "prettier" },
|
||||
vue = { "prettier" },
|
||||
svelteress = { "prettier" },
|
||||
json = { "prettierd" },
|
||||
dart = { "dart_format" },
|
||||
yaml = { "yamlfmt" },
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
||||
36
lua/409/plugins/fzf.lua
Normal file
36
lua/409/plugins/fzf.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
{
|
||||
"ibhagwan/fzf-lua",
|
||||
-- optional for icon support
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
-- or if using mini.icons/mini.nvim
|
||||
-- dependencies = { "echasnovski/mini.icons" },
|
||||
lazy = false,
|
||||
opts = {
|
||||
hls = {
|
||||
border = "FloatBorder",
|
||||
preview_border = "FloatBorder",
|
||||
header_text = "Function",
|
||||
},
|
||||
winopts = {
|
||||
border = "single",
|
||||
preview = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
fzf_opts = {
|
||||
["--layout"] = "reverse-list",
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>ca",
|
||||
":FzfLua lsp_code_actions<CR>",
|
||||
desc = "Code actions (Preview)",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("fzf-lua").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -52,6 +52,9 @@ return {
|
||||
current_line_blame_opts = {
|
||||
delay = 1000,
|
||||
},
|
||||
preview_config = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
|
||||
13
lua/409/plugins/lazydev.lua
Normal file
13
lua/409/plugins/lazydev.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,262 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v2.x",
|
||||
dependencies = {
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
build = function()
|
||||
pcall(vim.cmd, "MasonUpdate")
|
||||
end,
|
||||
},
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
},
|
||||
config = function()
|
||||
local lsp = require("lsp-zero")
|
||||
|
||||
-- Hyprlang LSP
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
||||
pattern = { "*.hl", "hypr*.conf" },
|
||||
callback = function(event)
|
||||
vim.lsp.start({
|
||||
name = "hyprlang",
|
||||
cmd = { "hyprls" },
|
||||
root_dir = vim.fn.getcwd(),
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "markdown" then
|
||||
return
|
||||
end
|
||||
|
||||
local lsp_opts = { buffer = bufnr, remap = false }
|
||||
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition({
|
||||
on_list = function(list)
|
||||
vim.lsp.util.jump_to_location(list.items[1].user_data, "utf-8", true)
|
||||
end,
|
||||
})
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "gi", function()
|
||||
vim.lsp.buf.implementation()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vws", function()
|
||||
vim.lsp.buf.workspace_symbol()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vd", function()
|
||||
vim.diagnostic.open_float()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "[d", function()
|
||||
vim.diagnostic.goto_next()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "]d", function()
|
||||
vim.diagnostic.goto_prev()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vca", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vrr", function()
|
||||
vim.lsp.buf.references()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("n", "<leader>vrn", function()
|
||||
vim.lsp.buf.rename()
|
||||
end, lsp_opts)
|
||||
vim.keymap.set("i", "<C-h>", function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, lsp_opts)
|
||||
end)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"saghen/blink.cmp",
|
||||
},
|
||||
opts = {
|
||||
diagnostics = {
|
||||
virtual_text = true,
|
||||
update_in_insert = true,
|
||||
float = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
inlay_hints = {
|
||||
enabled = false,
|
||||
},
|
||||
servers = {
|
||||
tailwindcss = {
|
||||
filetypes_exclude = { "markdown", "rust", "proto", "sh", "gitignore", "toml", "json", "fugitive" },
|
||||
hovers = true,
|
||||
suggestions = true,
|
||||
root_dir = function(fname)
|
||||
local root_pattern = require("lspconfig").util.root_pattern(
|
||||
"tailwind.config.cjs",
|
||||
"talwind.config.js",
|
||||
"tailwind.config.ts",
|
||||
"postcss.config.js",
|
||||
"postcss.config.ts"
|
||||
)
|
||||
|
||||
return root_pattern(fname)
|
||||
end,
|
||||
},
|
||||
vtsls = {
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
},
|
||||
settings = {
|
||||
vtsls = {
|
||||
ts_ls = {
|
||||
globalPlugins = {
|
||||
{
|
||||
name = "typescript-svelte-plugin",
|
||||
location = vim.fn.getcwd() .. "/node_modules/typescript-svelte-plugin",
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
{
|
||||
name = "typescript-svelte-plugin",
|
||||
location = vim.fn.getcwd() .. "/node_modules/typescript-svelte-plugin",
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
typescript = {
|
||||
preferences = {
|
||||
quoteStyle = "single",
|
||||
},
|
||||
updateImportsOnFileMove = {
|
||||
enabled = "always",
|
||||
},
|
||||
suggest = {
|
||||
completeFunctionCalls = true,
|
||||
},
|
||||
},
|
||||
javascript = {
|
||||
preferences = {
|
||||
quoteStyle = "single",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
svelte = {
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = { dynamicRegistration = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require("lspconfig")
|
||||
local lsp = require("lsp-zero")
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local buffer = args.buf
|
||||
local lsp_opts = { buffer = buffer, remap = false, nowait = true }
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
|
||||
if
|
||||
opts.inlay_hints.enabled
|
||||
and client ~= nil
|
||||
and client.supports_method("textDocument/inlayHint")
|
||||
then
|
||||
vim.lsp.inlay_hint.enable(true)
|
||||
end
|
||||
|
||||
if client ~= nil then
|
||||
if client.name == "svelte" then
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = { "*.svelte", "*.js", "*.ts" },
|
||||
group = vim.api.nvim_create_augroup("svelte_ondidchangetsorjsfile", { clear = true }),
|
||||
callback = function(ctx)
|
||||
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match })
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if vim.bo[buffer].filetype == "svelte" then
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = { "*.svelte", "*.js", "*.ts" },
|
||||
callback = function(ctx)
|
||||
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.diagnostic.config(opts.diagnostics)
|
||||
|
||||
require("lspconfig.ui.windows").default_options = {
|
||||
border = "single",
|
||||
}
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"vtsls",
|
||||
"eslint",
|
||||
"lua_ls",
|
||||
"jsonls",
|
||||
"html",
|
||||
"tailwindcss",
|
||||
"pylsp",
|
||||
"dockerls",
|
||||
"bashls",
|
||||
"marksman",
|
||||
"rust_analyzer",
|
||||
},
|
||||
handlers = {
|
||||
function(server_name)
|
||||
if lspconfig[server_name] ~= nil then
|
||||
local config = opts.servers[server_name] or {}
|
||||
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
|
||||
lspconfig[server_name].setup(config)
|
||||
end
|
||||
end,
|
||||
lua_ls = function()
|
||||
local config = lsp.nvim_lua_ls()
|
||||
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
|
||||
require("lspconfig").lua_ls.setup(config)
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {},
|
||||
opts = {
|
||||
PATH = "append",
|
||||
ui = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("mason").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
37
lua/409/plugins/mason.lua
Normal file
37
lua/409/plugins/mason.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {},
|
||||
opts = {
|
||||
PATH = "append",
|
||||
ui = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vtsls",
|
||||
"eslint",
|
||||
"lua_ls",
|
||||
"jsonls",
|
||||
"html",
|
||||
"tailwindcss",
|
||||
"pylsp",
|
||||
"dockerls",
|
||||
"bashls",
|
||||
"marksman",
|
||||
"rust_analyzer",
|
||||
},
|
||||
automatic_enable = true,
|
||||
},
|
||||
config = true
|
||||
},
|
||||
}
|
||||
@@ -154,7 +154,7 @@ return {
|
||||
{
|
||||
"<C-b>",
|
||||
function()
|
||||
require("telescope.builtin").buffers()
|
||||
require('fzf-lua').buffers()
|
||||
end,
|
||||
desc = "Find buffers",
|
||||
},
|
||||
|
||||
@@ -41,11 +41,26 @@ return {
|
||||
ui = {
|
||||
enable = false,
|
||||
},
|
||||
workspaces = {
|
||||
{
|
||||
name = "personal",
|
||||
path = "~/obsidian/409",
|
||||
},
|
||||
},
|
||||
workspaces = (function()
|
||||
local vaults = {}
|
||||
|
||||
local vaults_file_path = vim.fn.stdpath("config") .. "/.obsidian_vaults"
|
||||
local vaults_file = io.open(vaults_file_path, "r")
|
||||
|
||||
if vaults_file == nil then
|
||||
return vaults
|
||||
end
|
||||
|
||||
for line in vaults_file:lines() do
|
||||
for vault_name, vault_path in string.gmatch(line, "%s*(%S+)%s*=%s*(.+)%s*") do
|
||||
vaults[#vaults + 1] = {
|
||||
name = vault_name,
|
||||
path = vault_path,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
return vaults
|
||||
end)(),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ return {
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "dracula-nvim",
|
||||
theme = "catppuccin",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
|
||||
@@ -1,27 +1,93 @@
|
||||
return {
|
||||
{
|
||||
"Mofiqul/dracula.nvim",
|
||||
name = "dracula",
|
||||
lazy = false,
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("dracula").setup({
|
||||
transparent_bg = true,
|
||||
})
|
||||
vim.cmd.colorscheme("dracula")
|
||||
opts = {
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
show_end_of_buffer = false,
|
||||
integrations = {
|
||||
blink_cmp = true,
|
||||
treesitter = true,
|
||||
gitsigns = true,
|
||||
},
|
||||
no_italic = true,
|
||||
no_underline = false,
|
||||
highlight_overrides = {
|
||||
mocha = function(mocha)
|
||||
return {
|
||||
Comment = { fg = mocha.overlay0 },
|
||||
}
|
||||
end
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("catppuccin").setup(opts)
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
|
||||
local colors = require("catppuccin.palettes").get_palette(opts.flavour)
|
||||
|
||||
vim.api.nvim_set_hl(0, "LineNr", { fg = colors.surface2 })
|
||||
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "QuickFixLine", { link = "Visual" })
|
||||
vim.api.nvim_set_hl(0, "TelescopePromptBorder", { fg = "#44475a" })
|
||||
vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { fg = "#44475a" })
|
||||
vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { fg = "#44475a" })
|
||||
vim.api.nvim_set_hl(0, "TelescopePromptCounter", { fg = "#44475a" })
|
||||
vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#44475a" })
|
||||
vim.api.nvim_set_hl(0, "PmenuSel", { fg = "#282a36", bg = "#50fa7b", bold = true })
|
||||
vim.api.nvim_set_hl(0, "TelescopePromptBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "TelescopePromptCounter", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "FloatBorder", { fg = colors.surface2 })
|
||||
vim.api.nvim_set_hl(0, "PmenuSel", { fg = colors.crust, bg = colors.blue, bold = true })
|
||||
|
||||
vim.api.nvim_set_hl(0, "TabLine", { fg = "#f8f8f2", bg = "#44475a" })
|
||||
vim.api.nvim_set_hl(0, "TabLineSel", { fg = "#282a36", bg = "#50fa7b", bold = true })
|
||||
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#50fa7b" })
|
||||
vim.api.nvim_set_hl(0, "DashboardShortCut", { fg = "#bd93f9" })
|
||||
vim.api.nvim_set_hl(0, "TabLine", { fg = colors.text, bg = colors.mantle })
|
||||
vim.api.nvim_set_hl(0, "TabLineSel", { fg = colors.crust, bg = colors.blue, bold = true })
|
||||
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = colors.blue })
|
||||
vim.api.nvim_set_hl(0, "DashboardShortCut", { fg = colors.crust })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpMenu", { fg = colors.text, bg = "none" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpMenuBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpDocBorder", { link = "FloatBorder" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpSignatureHelpBorder", { link = "FloatBorder" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpLabelMatch", { fg = colors.blue, bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpLabel", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpMenuSelection", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKind", { link = "BlinkCmpLabel" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpGhostText", { fg = colors.overlay0 })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindTypeParameter", { link = "@variable.parameter" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindConstructor", { link = "@type" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindEnumMember", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindReference", { link = "@variable.parameter.reference" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindInterface", { link = "@type" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindVariable", { link = "@variable" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindProperty", { link = "@property" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindOperator", { link = "@operator" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindFunction", { link = "@function" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindConstant", { link = "@constant" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindSnippet", { link = "@markup" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindKeyword", { link = "@keyword" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindStruct", { link = "@structure" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindModule", { link = "@module" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindMethod", { link = "@function.method" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindFolder", { link = "TSURI" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindValue", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindField", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindEvent", { link = "@constant" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindColor", { link = "DevIconCss" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindClass", { link = "@type" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindUnit", { link = "@variable.member" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindText", { link = "@markup" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindFile", { link = "TSURI" })
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpKindEnum", { link = "@variable.member" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "BlinkCmpLabelDescription", { link = "Comment" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "SnippetTabstop", { bg = "none" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@ return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-tree-docs",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
|
||||
@@ -22,7 +22,7 @@ return {
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local theme_colors = require("dracula").colors()
|
||||
local theme_colors = require("catppuccin.palettes").get_palette('mocha')
|
||||
|
||||
require("tiny-devicons-auto-colors").setup({
|
||||
colors = theme_colors,
|
||||
|
||||
@@ -9,23 +9,17 @@ vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "n", "nzzzv")
|
||||
vim.keymap.set("n", "N", "Nzzzv")
|
||||
|
||||
-- greatest remap ever
|
||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||
|
||||
-- next greatest remap ever : asbjornHaland
|
||||
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
||||
|
||||
-- This is going to get me cancelled
|
||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||
|
||||
vim.keymap.set("n", "Q", "<nop>")
|
||||
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
||||
|
||||
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
|
||||
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
|
||||
|
||||
@@ -47,3 +41,20 @@ vim.keymap.set("v", ">", ">gv")
|
||||
|
||||
vim.keymap.set("n", "]q", "<cmd>cnext<CR>")
|
||||
vim.keymap.set("n", "[q", "<cmd>cprev<CR>")
|
||||
|
||||
-- toggle quickfix list
|
||||
vim.keymap.set("n", "<leader>q", function()
|
||||
local qf_exists = false
|
||||
for _, win in pairs(vim.fn.getwininfo()) do
|
||||
if win["quickfix"] == 1 then
|
||||
qf_exists = true
|
||||
end
|
||||
end
|
||||
if qf_exists == true then
|
||||
vim.cmd("cclose")
|
||||
return
|
||||
end
|
||||
if not vim.tbl_isempty(vim.fn.getqflist()) then
|
||||
vim.cmd("copen")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -40,6 +40,8 @@ vim.opt.concealcursor = "n"
|
||||
vim.opt.conceallevel = 0
|
||||
vim.g.lsp_zero_ui_float_border = "single"
|
||||
|
||||
vim.opt.fillchars = "eob: "
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||
})
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
TODO
|
||||
Binary file not shown.
Reference in New Issue
Block a user