aboutsummaryrefslogtreecommitdiffstats
path: root/lua/pi
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2024-08-30 15:54:08 -0300
committerElvis Claros Castro <elvis@claros.ar>2024-08-30 15:54:08 -0300
commit6364400a98c93cdf6f2209670be1d2b6e31ee6ab (patch)
tree8e3c5d3bc755722614c796894dc5e63fdd763770 /lua/pi
parent066df483e9441e89d7af25b171784efcf3ffffec (diff)
parent15ea0d5ae7c393493407ffb0c151656cc27ee01b (diff)
downloadnvim-conf-6364400a98c93cdf6f2209670be1d2b6e31ee6ab.tar.gz
nvim-conf-6364400a98c93cdf6f2209670be1d2b6e31ee6ab.zip
Merge branch 'ts-dap'
Diffstat (limited to 'lua/pi')
-rw-r--r--lua/pi/completition/init.lua11
-rw-r--r--lua/pi/dap/configs/javascript.lua28
-rw-r--r--lua/pi/lsp/default.lua2
3 files changed, 28 insertions, 13 deletions
diff --git a/lua/pi/completition/init.lua b/lua/pi/completition/init.lua
index ec128a0..5b9fd18 100644
--- a/lua/pi/completition/init.lua
+++ b/lua/pi/completition/init.lua
@@ -55,13 +55,14 @@ cmp.setup {
["<c-space>"] = cmp.mapping.complete(),
},
sources = {
- { name = "dictionary", keyword_length = 2},
+ -- { name = "dictionary", keyword_length = 2},
{ name = "nvim_lua" },
{ name = "nvim_lsp" },
{ name = "path" },
{ name = "luasnip" },
{ name = "copilot" },
{name = "codeium"},
+ { name = 'cmp_ai' },
{ name = 'html-css',
option = {
max_count = {}, -- not ready yet
@@ -109,6 +110,7 @@ cmp.setup {
local KIND_ICONS = {
Tailwind = '󰹞󰹞󰹞󰹞󰹞󰹞󰹞󰹞',
Copilot = "",
+ Ollama = "",
Text = "󰉿",
Method = "󰆧",
Function = "󰊕",
@@ -135,6 +137,9 @@ cmp.setup {
Operator = "󰆕",
Codeium = "",
TypeParameter = "󰜅",
+ OpenAI = "",
+ TinyLlama = "󱝊",
+ LlamaCPP = ""
}
if vim_item.kind == 'Color' and entry.completion_item.documentation then
@@ -179,6 +184,10 @@ cmp.setup {
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#3426C3" })
vim.api.nvim_set_hl(0, "CmpItemKindCodeium", { fg = "#2ACDBA" })
+vim.api.nvim_set_hl(0, "CmpItemKindOllama", { fg = "#FDFEFF" })
+vim.api.nvim_set_hl(0, "CmpItemKindOpenAI", { fg = "#080808" })
+vim.api.nvim_set_hl(0, "CmpItemKindTinyLlama", { fg = "#DF468C"})
+vim.api.nvim_set_hl(0, "CmpItemKindLlamaCPP", { fg = "#FF8235"})
-- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", {
diff --git a/lua/pi/dap/configs/javascript.lua b/lua/pi/dap/configs/javascript.lua
index 03173ba..ef616f1 100644
--- a/lua/pi/dap/configs/javascript.lua
+++ b/lua/pi/dap/configs/javascript.lua
@@ -4,17 +4,23 @@ dap.adapters.firefox = {
command = 'firefox-debug-adapter',
}
-dap.configurations.typescript = {
- {
- name = 'Debug with Firefox',
- type = 'firefox',
- request = 'launch',
- reAttach = true,
- url = 'http://localhost:3010',
- webRoot = '${workspaceFolder}',
- firefoxExecutable = '/home/elvis/.local/bin/firefox'
- },
-}
+for _, language in ipairs({ "typescript", "javascript", "javascriptreact", "typescriptreact" }) do
+ dap.configurations[language] = {
+ {
+ name = 'Debug with Firefox',
+ type = 'firefox',
+ request = 'launch',
+ reAttach = true,
+ url = 'http://localhost:5173',
+ webRoot = '${workspaceFolder}',
+ firefoxExecutable = '/home/elvis/.local/bin/firefox',
+ -- firefoxArgs = {'-start-debugger-server', '--new-instance'},
+ enableCRAWorkaround = true,
+ liftAccessorsFromPrototypes = 3,
+ },
+ }
+end
+
-- require("dap-vscode-js").setup {
-- debugger_cmd = { "js-debug-adapter" },
-- adapters = { "pwa-node", "pwa-chrome", "node-terminal" },
diff --git a/lua/pi/lsp/default.lua b/lua/pi/lsp/default.lua
index 8a47cbf..ff5c97e 100644
--- a/lua/pi/lsp/default.lua
+++ b/lua/pi/lsp/default.lua
@@ -9,7 +9,7 @@ return {
html = { enable = true },
jsonls = { enable = true },
lua_ls = { enable = true, neodev = true },
- nil_ls = { enable = true },
+ -- nil_ls = { enable = true },
phpactor = {enable = true },
rust_analyzer = { enable = true },
svelte = { enable = true },