aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/alpha/dap/init.lua4
-rw-r--r--lua/alpha/lsp/default.lua1
-rw-r--r--lua/alpha/lsp/servers/texlab.lua16
-rw-r--r--lua/config/keymaps.lua10
-rw-r--r--lua/config/options.lua4
-rw-r--r--lua/plugins/CodeGPT.lua10
-rw-r--r--lua/plugins/flutter.lua11
-rw-r--r--lua/plugins/indent-blankline.lua5
-rw-r--r--lua/plugins/llm.lua55
-rw-r--r--lua/plugins/nvim-python-repl.lua12
-rw-r--r--lua/plugins/rust-tools.lua66
-rw-r--r--lua/plugins/treesitter.lua4
12 files changed, 195 insertions, 3 deletions
diff --git a/lua/alpha/dap/init.lua b/lua/alpha/dap/init.lua
index 81651f7..44b3e50 100644
--- a/lua/alpha/dap/init.lua
+++ b/lua/alpha/dap/init.lua
@@ -25,7 +25,7 @@ dapui.setup {
"stacks",
"watches",
},
- size = 80,
+ size = 50,
position = "right",
},
{
@@ -33,7 +33,7 @@ dapui.setup {
"repl",
"console",
},
- size = 10,
+ size = 7,
position = "bottom",
},
},
diff --git a/lua/alpha/lsp/default.lua b/lua/alpha/lsp/default.lua
index 4f53ddd..639282d 100644
--- a/lua/alpha/lsp/default.lua
+++ b/lua/alpha/lsp/default.lua
@@ -16,6 +16,7 @@ return {
tailwindcss = { enable = true, filetypes = {"blade", "html", "svelte"} },
tsserver = { enable = true },
volar = { enable = true },
+ texlab = { enable = true, filetypes = {"tex", "bib"} },
},
default_options = function (options)
return vim.tbl_deep_extend("force", {
diff --git a/lua/alpha/lsp/servers/texlab.lua b/lua/alpha/lsp/servers/texlab.lua
new file mode 100644
index 0000000..d749db9
--- /dev/null
+++ b/lua/alpha/lsp/servers/texlab.lua
@@ -0,0 +1,16 @@
+local lsp_attach = require "alpha.lsp.attach"
+local lsp_flags = require "alpha.lsp.flags"
+return function(ops)
+ return vim.tbl_extend("force", {
+ on_attach = lsp_attach,
+ flags = lsp_flags,
+ settings = {
+ ["texlab"] = {
+ latexFormatter = "latexindent",
+ latexindent = {
+ modifyLineBreaks = false
+ }
+ }
+ }
+ }, ops)
+end
diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua
index 22b786d..3013d65 100644
--- a/lua/config/keymaps.lua
+++ b/lua/config/keymaps.lua
@@ -71,3 +71,13 @@ map("n", "<leader>vn", vim.diagnostic.goto_next, { desc = "Goes to next diagnost
map("n", "<leader>vp", vim.diagnostic.goto_prev, { desc = "Goes to prev diagnostic error" })
map("v", "<leader>q", require('alpha.select_to_quickfix').handle)
+map('n', '99', ':set invspell<CR>', { noremap = true })
+map("n", "<leader>ss", function() require('nvim-python-repl').send_statement_definition() end, { desc = "Send semantic unit to REPL"})
+map("n", "<leader>sl", function() require('nvim-python-repl').send_visual_to_repl() end, { desc = "Send visual selection to REPL"})
+map("v", "<leader>sl", function() require('nvim-python-repl').send_visual_to_repl() end, { desc = "Send visual selection to REPL"})
+map("n", "<leader>MReturn", function() require('nvim-python-repl').send_buffer_to_repl() end, { desc = "Send entire buffer to REPL"})
+map("n", "<leader>e", function() require('nvim-python-repl').toggle_execute() end, { desc = "Automatically execute command in REPL after sent"})
+map("n", "<leader>vi", function() require('nvim-python-repl').toggle_vertical() end, { desc = "Create REPL in vertical or horizontal split"})
+map("n", "<leader>rl",function() require('rust-tools').inlay_hints.enable() end, {desc = "Enable inlay hints auto update and set them for all the buffers"})
+map("n", "<leader>rdl",function() require('rust-tools').inlay_hints.disable() end, {desc = "Disable inlay hints auto update and unset them for all buffers"})
+map("n", "<leader>rrn", function () require('rust-tools').runnables.runnables() end, {desc = "run rust"})
diff --git a/lua/config/options.lua b/lua/config/options.lua
index 7cbc205..c6449c6 100644
--- a/lua/config/options.lua
+++ b/lua/config/options.lua
@@ -14,7 +14,9 @@ opt.softtabstop = 4
opt.shiftwidth = 4
opt.smartindent = true
opt.errorbells = false
-opt.wrap = false
+opt.wrap = true
+opt.spell = true
+opt.spelllang = "en_us,es"
opt.swapfile = false
opt.undofile = true
opt.undodir = os.getenv "HOME" .. "/.cache/nvim/undodir"
diff --git a/lua/plugins/CodeGPT.lua b/lua/plugins/CodeGPT.lua
new file mode 100644
index 0000000..ee3579b
--- /dev/null
+++ b/lua/plugins/CodeGPT.lua
@@ -0,0 +1,10 @@
+return {
+ "dpayne/CodeGPT.nvim",
+ dependencies = {
+ 'nvim-lua/plenary.nvim',
+ 'MunifTanjim/nui.nvim',
+ },
+ config = function()
+ require("codegpt.config")
+ end
+}
diff --git a/lua/plugins/flutter.lua b/lua/plugins/flutter.lua
new file mode 100644
index 0000000..91cabad
--- /dev/null
+++ b/lua/plugins/flutter.lua
@@ -0,0 +1,11 @@
+return
+{
+ 'akinsho/flutter-tools.nvim',
+ lazy = true,
+ filetype = 'dart',
+ dependencies = {
+ 'nvim-lua/plenary.nvim',
+ 'stevearc/dressing.nvim', -- optional for vim.ui.select
+ },
+ config = true,
+}
diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua
index 3d5f6fe..1a26aa1 100644
--- a/lua/plugins/indent-blankline.lua
+++ b/lua/plugins/indent-blankline.lua
@@ -1,4 +1,9 @@
return {
"lukas-reineke/indent-blankline.nvim",
config = true,
+ main = "ibl",
+ opts = {
+ char = '┊',
+ show_trailing_blankline_indent = false
+ }
}
diff --git a/lua/plugins/llm.lua b/lua/plugins/llm.lua
new file mode 100644
index 0000000..8a71fb6
--- /dev/null
+++ b/lua/plugins/llm.lua
@@ -0,0 +1,55 @@
+return {
+ 'huggingface/llm.nvim',
+ config = function()
+ require('hfcc').setup({
+ api_token = "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", -- cf Install paragraph
+ -- parameters that are added to the request body
+ query_params = {
+ max_new_tokens = 60,
+ temperature = 0.2,
+ top_p = 0.95,
+ -- stop_token = "<|endoftext|>",
+ -- stop_token = nil,
+ stop_token = "<EOT>",
+ },
+ -- lsp = {
+ -- enabled = false,
+ -- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "/mason/bin/llm-ls",
+ -- },
+ debounce_ms = 80,
+ accept_keymap = "<M-Right>",
+ dismiss_keymap = "<S-Tab>",
+ max_context_after = 50,
+ max_context_before = 50,
+ tls_skip_verify_insecure = false,
+
+ enable_suggestions_on_startup = true,
+ enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
+ -- model = "bigcode/starcoder", -- can be a model ID or an http(s) endpoint
+ -- context_window = 8192,
+ -- tokens_to_clear = { "<|endoftext|>" },
+ -- tokenizer = {
+ -- path = "~/.config/tokenizer/starcoder/tokenizer.json"
+ -- },
+ -- -- set this if the model supports fill in the middle
+ -- fim = {
+ -- enabled = true,
+ -- prefix = "<fim_prefix>",
+ -- middle = "<fim_middle>",
+ -- suffix = "<fim_suffix>",
+ -- },
+ model = "codellama/CodeLlama-7b-hf",
+ context_window = 4096,
+ -- tokens_to_clear = { "<EOT>" },
+ -- tokenizer = {
+ -- path = "~/.config/tokenizer/codellama/tokenizer.json",
+ -- },
+ fim = {
+ enabled = true,
+ prefix = "<PRE> ",
+ middle = " <MID>",
+ suffix = " <SUF>",
+ },
+ })
+ end
+}
diff --git a/lua/plugins/nvim-python-repl.lua b/lua/plugins/nvim-python-repl.lua
new file mode 100644
index 0000000..cfab1b6
--- /dev/null
+++ b/lua/plugins/nvim-python-repl.lua
@@ -0,0 +1,12 @@
+return
+ {
+ "geg2102/nvim-python-repl",
+ dependencies = "nvim-treesitter",
+ ft = {"python", "lua", "scala"},
+ config = function()
+ require("nvim-python-repl").setup({
+ execute_on_send = false,
+ vsplit = true,
+ })
+ end
+ }
diff --git a/lua/plugins/rust-tools.lua b/lua/plugins/rust-tools.lua
new file mode 100644
index 0000000..8e49c90
--- /dev/null
+++ b/lua/plugins/rust-tools.lua
@@ -0,0 +1,66 @@
+return
+{
+ "simrat39/rust-tools.nvim",
+ ft = "rust",
+ config = function()
+ require("rust-tools").setup({
+ tools = {
+ autoSetHints = true,
+ runnables = {
+ use_telescope = true
+ },
+ debugger = {
+ use_telescope = true
+ },
+ inlay_hints = {
+ -- automatically set inlay hints (type hints)
+ -- default: true
+ auto = false,
+ -- Only show inlay hints for the current line
+ only_current_line = false,
+ -- whether to show parameter hints with the inlay hints or not
+ -- default: true
+ show_parameter_hints = true,
+ -- prefix for parameter hints
+ -- default: "<-"
+ parameter_hints_prefix = "<- ",
+ -- prefix for all the other hints (type, chaining)
+ -- default: "=>"
+ other_hints_prefix = "=> ",
+ -- whether to align to the length of the longest line in the file
+ max_len_align = false,
+ -- padding from the left if max_len_align is true
+ max_len_align_padding = 1,
+ -- whether to align to the extreme right or not
+ right_align = false,
+ -- padding from the right if right_align is true
+ right_align_padding = 7,
+ -- The color of the hints
+ highlight = "Comment",
+ },
+ crate_graph = {
+ -- Backend used for displaying the graph
+ -- see: https://graphviz.org/docs/outputs/
+ -- default: x11
+ backend = "gtk",
+ -- where to store the output, nil for no output stored (relative
+ -- path from pwd)
+ -- default: nil
+ output = "/tmp/crate_graph",
+ -- true for all crates.io and external crates, false only the local
+ -- crates
+ -- default: true
+ full = true,
+ },
+ },
+ })
+ end,
+ dap = {
+ adapter = {
+ type = "executable",
+ command = "/bin/lldb-vscode",
+ name = "rt_lldb",
+ },
+ },
+
+}
diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua
index c706821..db2a4bc 100644
--- a/lua/plugins/treesitter.lua
+++ b/lua/plugins/treesitter.lua
@@ -32,6 +32,10 @@ return {
"regex",
"vim",
"yaml",
+ "latex",
+ "python",
+ "dockerfile",
+ "cpp",
},
highlight = {
enable = true,