mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 11:40:36 +00:00
feat(dap.lua): add virtual text setup for better debugging experience
feat(dap.lua): add support for process.env.PORT environment variable to be able to run app on a configurable port feat(lsp-config.lua): add support for detecting python environment using DPE module feat(lualine.lua): add support for noice statusline component feat(mason.lua): update installed language servers list feat(noice.lua): add configuration for noice plugin feat(none-ls.lua): remove black and mypy formatters from null-ls setup fix(nvim-cmp.lua): change completeopt value to "menu,menuone,preview,noinsert" and add autocomplete trigger event on text change feat(nvim-cmp.lua): add border and winhighlight settings for documentation window to improve visual appearance feat(nvim-cmp.lua): add 'nvim_lsp_signature_help' as a source for autocompletion refactor(colorscheme.lua): refactor SetupWindowPreferences function to dynamically set blend values for highlight groups feat(init.lua): add setting for 'completeopt' to "menuone" feat(plugins/noice.lua): add configuration for 'noice.nvim' plugin with dependencies and event trigger feat(plugins/nvim-treesitter.lua): update configuration to run TSUpdate command silently feat(utils): add Lua utility functions to detect and manage Lua versions and paths feat(utils): add Python utility functions to check and resolve Python environments style(theme): update current theme to 'catppuccin' in Lua script
This commit is contained in:
@@ -1,67 +1,69 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
|
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
||||||
"catppuccin": { "branch": "main", "commit": "10eda02ea4faa7d1f94e77a3410a4ae91c25c5f5" },
|
"catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" },
|
||||||
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
|
"cheatsheet.nvim": { "branch": "master", "commit": "9716f9aaa94dd1fd6ce59b5aae0e5f25e2a463ef" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" },
|
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "25f73977033c597d530c7ab0e211d99b60927d2d" },
|
"copilot.vim": { "branch": "release", "commit": "782461159655b259cff10ecff05efa761e3d4764" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
|
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
||||||
"flutter-tools.nvim": { "branch": "main", "commit": "5aa227fa083fd740184b55b5220dfabc24a25cc7" },
|
"flutter-tools.nvim": { "branch": "main", "commit": "ea1d398f543a54ba95357c3b8bb9d6f68eaec36c" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||||
"fzf": { "branch": "master", "commit": "d9404fcce45be6a95d697fb2229e77e5ac8bb0c4" },
|
"fzf": { "branch": "master", "commit": "855f90727af7827d9934b7fa00ea5ed51f5e4e81" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "50543e3993f4b996eea01ff5ccc8fe2a354c5388" },
|
"git-blame.nvim": { "branch": "master", "commit": "8c56e864d448e84e0162872c381dd2715824dce2" },
|
||||||
"gitignore.nvim": { "branch": "master", "commit": "2455191ec94da8ed222806a4fe3aa358eac1e558" },
|
"gitignore.nvim": { "branch": "master", "commit": "2455191ec94da8ed222806a4fe3aa358eac1e558" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "f074844b60f9e151970fbcdbeb8a2cd52b6ef25a" },
|
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
||||||
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
|
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
||||||
"incline.nvim": { "branch": "main", "commit": "16fc9c073e3ea4175b66ad94375df6d73fc114c0" },
|
"incline.nvim": { "branch": "main", "commit": "16fc9c073e3ea4175b66ad94375df6d73fc114c0" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
||||||
"jedi-vim": { "branch": "master", "commit": "130ce7fb7910b99b494b0d7ed665e40bfb6663bd" },
|
|
||||||
"keyseer.nvim": { "branch": "main", "commit": "6cb478f9b2be4af4680ceb0308a9b49cd6b6ea73" },
|
"keyseer.nvim": { "branch": "main", "commit": "6cb478f9b2be4af4680ceb0308a9b49cd6b6ea73" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
|
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "ba9c2f0b93deb48d0a99ae0e8d8dd36f7cc286d6" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4ba55f9755ebe8297d92c419b90a946123292ae6" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" },
|
"mini.nvim": { "branch": "main", "commit": "19e1584124cda35388d4fdb911eab7124014e541" },
|
||||||
"nightfly": { "branch": "master", "commit": "19efaf31cbe15a429cb3ca6ac9c9fce13275045b" },
|
"nightfly": { "branch": "master", "commit": "19efaf31cbe15a429cb3ca6ac9c9fce13275045b" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||||
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
|
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" },
|
"nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" },
|
||||||
"nvim-dap-python": { "branch": "master", "commit": "d777c2b32ed39f61209c09bede28d7491621a631" },
|
"nvim-dap-python": { "branch": "master", "commit": "db72bf6ab9f75fe841e8e11e772ee7fef6f484f1" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
|
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
|
||||||
"nvim-highlight-colors": { "branch": "main", "commit": "a8f6952cb1ff7bde864a34c502f1a42c360a6662" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" },
|
||||||
|
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
|
||||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
|
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "fdc44768a09a65140aa00c92872a5381ad486485" },
|
"nvim-lspconfig": { "branch": "master", "commit": "aaec5d049af99e7b975bdf68aca582f1aa91b338" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
"nvim-silicon": { "branch": "main", "commit": "feb882f04c992b797daa118101a239fb3bedfc04" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
|
"nvim-silicon": { "branch": "main", "commit": "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "9f8c99e980f55e72148a95a0fb2e260c95f6341b" },
|
"nvim-treesitter": { "branch": "master", "commit": "2b2ac302324f4cd2194c5dcaa59332b65e1c6403" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "2aba92ceb1479485953007f4d5adf34d0b66917e" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "5be6c4e685618b99c3210a69375b38a1202369b4" },
|
"nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" },
|
||||||
"nvim_lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"nvim_lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"pkl-neovim": { "branch": "main", "commit": "a0ae099c7eb926150ee0a126b1dd78086edbe3fc" },
|
"pkl-neovim": { "branch": "main", "commit": "a0ae099c7eb926150ee0a126b1dd78086edbe3fc" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"poet-v": { "branch": "master", "commit": "85a5dd44d89602cc3dccd2489924e9c7caab0044" },
|
"poet-v": { "branch": "master", "commit": "85a5dd44d89602cc3dccd2489924e9c7caab0044" },
|
||||||
"rose-pine": { "branch": "main", "commit": "e4b08d74b7272cb21e4e9c71b8b9e0830fd722fe" },
|
"rose-pine": { "branch": "main", "commit": "8b1fd252255a7f2c41b4192a787ab62660b29f72" },
|
||||||
"tailwind-sorter.nvim": { "branch": "main", "commit": "1b60096635a1a1bef6b36b6c88a61ff437df5a15" },
|
"tailwind-sorter.nvim": { "branch": "main", "commit": "e03eea3909c28509375993fb77a42454ac8ecbb2" },
|
||||||
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
|
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
|
||||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "8574946bf6d0d820d7f600f3db808f5900a2ae23" },
|
"telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" },
|
||||||
"telescope-themes": { "branch": "main", "commit": "13456106a7ff6ad3f6bfb0e00a4aac3de10ddb47" },
|
"telescope-themes": { "branch": "main", "commit": "f005622f066cc0cdbaf9bb44c48edbec67985501" },
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
"tmux-status.nvim": { "branch": "main", "commit": "cfa6442ef044c2cfec9228a609ba36bd34809503" },
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
|
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" },
|
"toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" },
|
||||||
"tokyonight": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" },
|
"tokyonight": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" },
|
||||||
"treesj": { "branch": "main", "commit": "275f83c81a5a1f5ae23c1eac30c4ac28beebbca2" },
|
"treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||||
"vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }
|
"vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,35 @@
|
|||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
local dapui = require("dapui")
|
local dapui = require("dapui")
|
||||||
local dap_python = require("dap-python")
|
local dap_python = require("dap-python")
|
||||||
|
local virtual_text = require("nvim-dap-virtual-text")
|
||||||
|
|
||||||
|
-- Setup Virtual Text
|
||||||
|
virtual_text.setup({
|
||||||
|
prefix = " ",
|
||||||
|
hl = "Comment",
|
||||||
|
lines = 3,
|
||||||
|
enabled = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local mason_path = vim.fn.glob(vim.fn.stdpath("data") .. "/mason")
|
||||||
|
local debugpy_path = mason_path .. "/packages/debugpy/venv/bin/python"
|
||||||
|
|
||||||
|
dapui.setup()
|
||||||
|
dap_python.setup(debugpy_path)
|
||||||
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
dapui.open()
|
dapui.open()
|
||||||
end
|
end
|
||||||
|
|
||||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||||
dapui.close()
|
dapui.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||||
dapui.close()
|
dapui.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local path = "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python"
|
|
||||||
dap_python.setup(path)
|
|
||||||
|
|
||||||
-- Setup Mappings
|
-- Setup Mappings
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
vim.g["jedi#popup_on_dot"] = 1
|
|
||||||
vim.g["jedi#use_tabs_not_buffers"] = 0
|
|
||||||
vim.g["jedi#popup_select_first"] = 0
|
|
||||||
vim.g["jedi#show_call_signatures"] = "2"
|
|
||||||
|
|
||||||
|
|
||||||
-- Keybindings
|
|
||||||
vim.g["jedi#goto_command"] = "" -- "<leader>d"
|
|
||||||
vim.g["jedi#goto_assignments_command"] = "<leader>gD"
|
|
||||||
vim.g["jedi#goto_stubs_command"] = "" -- "<leader>s"
|
|
||||||
vim.g["jedi#goto_definitions_command"] = "gd"
|
|
||||||
vim.g["jedi#documentation_command"] = "K"
|
|
||||||
vim.g["jedi#usages_command"] = "<leader>n"
|
|
||||||
vim.g["jedi#completions_command"] = "<C-Space>"
|
|
||||||
vim.g["jedi#rename_command"] = "<leader>rn"
|
|
||||||
vim.g["jedi#rename_command_keep_name"] = "" -- "<leader>R"
|
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
|
|
||||||
|
local DPE = require("absolute.utils.detect-python-env")
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
opts.buffer = bufnr
|
opts.buffer = bufnr
|
||||||
@@ -73,7 +75,7 @@ lspconfig["html"].setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- configure typescript server with plugin
|
-- configure typescript server with plugin
|
||||||
lspconfig["tsserver"].setup({
|
lspconfig["ts_ls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
@@ -111,8 +113,20 @@ lspconfig["svelte"].setup({
|
|||||||
lspconfig["emmet_ls"].setup({
|
lspconfig["emmet_ls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte", "vue" },
|
filetypes = {
|
||||||
|
"html",
|
||||||
|
"typescriptreact",
|
||||||
|
"javascriptreact",
|
||||||
|
"css",
|
||||||
|
"sass",
|
||||||
|
"scss",
|
||||||
|
"less",
|
||||||
|
"svelte",
|
||||||
|
"vue",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- configure python lsp
|
-- configure python lsp
|
||||||
lspconfig["pylsp"].setup({
|
lspconfig["pylsp"].setup({
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
@@ -124,22 +138,29 @@ lspconfig["pylsp"].setup({
|
|||||||
rope_autoimport = {
|
rope_autoimport = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
completions = { enabled = true },
|
completions = { enabled = true },
|
||||||
|
rename = { enabled = false },
|
||||||
},
|
},
|
||||||
|
black = { enabled = true },
|
||||||
|
autopep8 = { enabled = false },
|
||||||
|
yapf = { enabled = false },
|
||||||
flake8 = { enabled = true },
|
flake8 = { enabled = true },
|
||||||
jedi_completion = {
|
jedi_completion = {
|
||||||
|
enabled = true,
|
||||||
include_params = true,
|
include_params = true,
|
||||||
|
fuzzy = true,
|
||||||
},
|
},
|
||||||
|
pylsp_mypy = {
|
||||||
|
enabled = true,
|
||||||
|
overrides = DPE.ResolvePythonEnvironment(),
|
||||||
|
report_progress = true,
|
||||||
|
live_mode = true,
|
||||||
|
},
|
||||||
|
-- import sorting
|
||||||
|
pyls_isort = { enabled = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
--
|
|
||||||
-- -- configure jedi language server
|
|
||||||
-- lspconfig["jedi_language_server"].setup({
|
|
||||||
-- capabilities = capabilities,
|
|
||||||
-- on_attach = on_attach,
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- configure docker server
|
-- configure docker server
|
||||||
lspconfig["dockerls"].setup({
|
lspconfig["dockerls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
@@ -226,13 +247,27 @@ lspconfig["astro"].setup({
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- configure kotlin server
|
-- configure kotlin server
|
||||||
lspconfig["kotlin_language_server"].setup({
|
lspconfig["kotlin_language_server"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- configure clang server
|
||||||
|
|
||||||
|
lspconfig["clangd"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- configure arduino language server
|
||||||
|
|
||||||
|
lspconfig["arduino_language_server"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
})
|
||||||
|
|
||||||
-- configure biome server
|
-- configure biome server
|
||||||
lspconfig["biome"].setup({
|
lspconfig["biome"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local lualine = require("lualine")
|
local lualine = require("lualine")
|
||||||
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
||||||
|
local noice = require("noice")
|
||||||
|
|
||||||
local colors = {
|
local colors = {
|
||||||
blue = "#65D1FF",
|
blue = "#65D1FF",
|
||||||
@@ -94,23 +94,12 @@ lualine.setup({
|
|||||||
theme = my_lualine_theme,
|
theme = my_lualine_theme,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
-- lualine_c = {
|
|
||||||
-- -- ...other lualine components
|
|
||||||
-- {
|
|
||||||
-- require('tmux-status').tmux_windows,
|
|
||||||
-- cond = require('tmux-status').show,
|
|
||||||
-- padding = { left = 3 },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- lualine_z = {
|
|
||||||
-- -- ...other lualine components
|
|
||||||
-- {
|
|
||||||
-- require('tmux-status').tmux_session,
|
|
||||||
-- cond = require('tmux-status').show,
|
|
||||||
-- padding = { left = 3 },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
|
{
|
||||||
|
noice.api.statusline.mode.get,
|
||||||
|
cond = noice.api.statusline.mode.has,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
GetFlutterToolsStatusLine,
|
GetFlutterToolsStatusLine,
|
||||||
cond = IsFlutterToolsActive,
|
cond = IsFlutterToolsActive,
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"tsserver",
|
"ts_ls",
|
||||||
"astro",
|
"astro",
|
||||||
"biome",
|
"biome",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"html",
|
"html",
|
||||||
"emmet_ls",
|
"emmet_ls",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
|
'arduino_language_server',
|
||||||
|
'clangd',
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
"svelte",
|
"svelte",
|
||||||
"cssls",
|
"cssls",
|
||||||
|
|||||||
92
lua/absolute/after/noice.lua
Normal file
92
lua/absolute/after/noice.lua
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
local noice = require("noice")
|
||||||
|
local notify = require("notify")
|
||||||
|
|
||||||
|
|
||||||
|
notify.setup({
|
||||||
|
top_down = false,
|
||||||
|
animate = false,
|
||||||
|
stages = "static",
|
||||||
|
})
|
||||||
|
|
||||||
|
noice.setup({
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
min_height = 20,
|
||||||
|
},
|
||||||
|
view = "cmdline_output",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "lsp",
|
||||||
|
kind = "progress",
|
||||||
|
cond = function(message)
|
||||||
|
local client = vim.tbl_get(message.opts, "progress", "client")
|
||||||
|
|
||||||
|
return client == "lua_ls"
|
||||||
|
end
|
||||||
|
},
|
||||||
|
opts = { skip = true },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lsp = {
|
||||||
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmdline = {
|
||||||
|
format = {
|
||||||
|
search_down = {
|
||||||
|
view = "cmdline",
|
||||||
|
},
|
||||||
|
search_up = {
|
||||||
|
view = "cmdline",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = 5,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = "auto",
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
filter_options = {},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = {
|
||||||
|
Normal = "Normal",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = 8,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = 10,
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = "rounded",
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,41 +1,9 @@
|
|||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
|
||||||
function CheckPoetryVirtualEnv()
|
|
||||||
local poetry = vim.fn.system("poetry env info -p 2>/dev/null")
|
|
||||||
if poetry == "" then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
return poetry
|
|
||||||
end
|
|
||||||
|
|
||||||
function ResolvePythonEnvironment()
|
|
||||||
-- Get system global python env
|
|
||||||
local python = vim.fn.system("which python3")
|
|
||||||
-- Check of virtual environments exists
|
|
||||||
local virtual = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") or CheckPoetryVirtualEnv()
|
|
||||||
|
|
||||||
if virtual == nil then
|
|
||||||
-- Check if poetry environment exists
|
|
||||||
|
|
||||||
return {
|
|
||||||
"--python-executable", python
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
"--python-executable", virtual .. "/bin/python3"
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
null_ls.builtins.formatting.prettierd,
|
null_ls.builtins.formatting.prettierd,
|
||||||
null_ls.builtins.formatting.shfmt,
|
null_ls.builtins.formatting.shfmt,
|
||||||
null_ls.builtins.formatting.black,
|
|
||||||
null_ls.builtins.diagnostics.mypy.with({
|
|
||||||
extra_args = ResolvePythonEnvironment()
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,37 +1,27 @@
|
|||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
local types = require('cmp.types')
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
local lspkind = require("lspkind")
|
local lspkind = require("lspkind")
|
||||||
|
|
||||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
local function border(hl_name)
|
|
||||||
return {
|
|
||||||
{ "╭", hl_name },
|
|
||||||
{ "─", hl_name },
|
|
||||||
{ "╮", hl_name },
|
|
||||||
{ "│", hl_name },
|
|
||||||
{ "╯", hl_name },
|
|
||||||
{ "─", hl_name },
|
|
||||||
{ "╰", hl_name },
|
|
||||||
{ "│", hl_name },
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = "menu,menuone,preview,noselect",
|
completeopt = "menu,menuone,preview,noinsert",
|
||||||
|
autocomplete = { types.cmp.TriggerEvent.TextChanged },
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
|
documentation = {
|
||||||
|
border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' },
|
||||||
|
winhighlight = 'Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None',
|
||||||
|
},
|
||||||
completion = {
|
completion = {
|
||||||
side_padding = 1,
|
side_padding = 1,
|
||||||
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None",
|
border = { '┌', '─', '┐', '│', '┘', '─', '└', '│' },
|
||||||
|
winhighlight = 'Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None',
|
||||||
scrollbar = false,
|
scrollbar = false,
|
||||||
},
|
},
|
||||||
documentation = {
|
|
||||||
border = border "CmpDocBorder",
|
|
||||||
winhighlight = "Normal:CmpDoc",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
@@ -39,16 +29,17 @@ cmp.setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
["<C-o>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||||
|
["<C-e>"] = cmp.mapping.abort(), -- close completion menu
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- accept current selection
|
["<CR>"] = cmp.mapping.confirm({ select = true }), -- accept current selection
|
||||||
}),
|
}),
|
||||||
-- sources for autocompletion
|
-- sources for autocompletion
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "otter" }, -- custom source for otter completion
|
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" }, -- snippets
|
{ name = "luasnip" }, -- snippets
|
||||||
{ name = "buffer" }, -- text within current buffer
|
{ name = "buffer" }, -- text within current buffer
|
||||||
{ name = "path" }, -- file system paths
|
{ name = "path" }, -- file system paths,
|
||||||
|
{ name = 'nvim_lsp_signature_help' },
|
||||||
}),
|
}),
|
||||||
-- configure lspkind for vs-code like pictograms in completion menu
|
-- configure lspkind for vs-code like pictograms in completion menu
|
||||||
formatting = {
|
formatting = {
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
local otter = require("otter")
|
|
||||||
|
|
||||||
-- table of embedded languages to look for.
|
|
||||||
-- required (no default)
|
|
||||||
local languages = { "python", "lua" }
|
|
||||||
|
|
||||||
-- enable completion/diagnostics
|
|
||||||
-- defaults are true
|
|
||||||
local completion = true
|
|
||||||
local diagnostics = true
|
|
||||||
-- treesitter query to look for embedded languages
|
|
||||||
-- uses injections if nil or not set
|
|
||||||
local tsquery = nil
|
|
||||||
|
|
||||||
otter.activate(languages, completion, diagnostics, tsquery)
|
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
local tsj = require("treesj")
|
local tsj = require("treesj")
|
||||||
|
|
||||||
|
|
||||||
|
local langs = {}
|
||||||
|
|
||||||
tsj.setup({
|
tsj.setup({
|
||||||
use_default_keymaps = false,
|
use_default_keymaps = false,
|
||||||
max_join_length = 1000,
|
max_join_length = 1000,
|
||||||
|
langs = langs,
|
||||||
})
|
})
|
||||||
|
|
||||||
local opts = { silent = true, noremap = true }
|
local opts = { silent = true, noremap = true }
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
local function SetupWindowPreferences()
|
local function SetupWindowPreferences()
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
-- Utility function to get the blend value or set a default
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
local function get_blend_value(group_name, default_blend)
|
||||||
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none" })
|
-- Retrieve highlight settings for the group using the new API
|
||||||
|
local current_highlight = vim.api.nvim_get_hl(0, { name = group_name })
|
||||||
|
return current_highlight.blend or default_blend
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set the Normal group with dynamic blend
|
||||||
|
local normal_blend = get_blend_value("Normal", 50)
|
||||||
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none", blend = normal_blend })
|
||||||
|
|
||||||
|
-- Set the NormalFloat group with dynamic blend
|
||||||
|
local normal_float_blend = get_blend_value("NormalFloat", 50)
|
||||||
|
vim.api.nvim_set_hl(1, "NormalFloat", { bg = "none", blend = normal_float_blend })
|
||||||
|
|
||||||
|
-- Set the NormalNC group with dynamic blend
|
||||||
|
local normal_nc_blend = get_blend_value("NormalNC", 50)
|
||||||
|
vim.api.nvim_set_hl(0, "NormalNC", { bg = "none", blend = normal_nc_blend })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local colorschemes = {
|
local colorschemes = {
|
||||||
["tokyonight-day"] = "Tokyo Night Day",
|
["tokyonight-day"] = "Tokyo Night Day",
|
||||||
["tokyonight-night"] = "Tokyo Night Night",
|
["tokyonight-night"] = "Tokyo Night Night",
|
||||||
@@ -35,7 +48,7 @@ local function SyncWezTerm()
|
|||||||
assert(file)
|
assert(file)
|
||||||
file:write(colorscheme)
|
file:write(colorscheme)
|
||||||
file:close()
|
file:close()
|
||||||
vim.notify("Setting WezTerm color scheme to " .. colorscheme, vim.log.levels.INFO)
|
-- vim.notify("Setting WezTerm color scheme to " .. colorscheme, vim.log.levels.INFO)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
local lua_utils = require("absolute.utils.detect-lua")
|
||||||
|
|
||||||
|
package.path = package.path .. lua_utils.GetLatestLuaVersion()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- disable nvim intro
|
-- disable nvim intro
|
||||||
vim.opt.shortmess:append "sI"
|
vim.opt.shortmess:append "sI"
|
||||||
|
|
||||||
@@ -37,6 +43,7 @@ vim.opt.updatetime = 50
|
|||||||
|
|
||||||
vim.opt.colorcolumn = ""
|
vim.opt.colorcolumn = ""
|
||||||
|
|
||||||
|
vim.o.completeopt = "menuone"
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = ";"
|
vim.g.maplocalleader = ";"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"nvim-tree/nvim-tree.lua",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.nvim-tree");
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"jmbuhr/otter.nvim",
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.otter")
|
|
||||||
end,
|
|
||||||
ft = { "py", "lua" }
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
|
|
||||||
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
|
|
||||||
|
|
||||||
|
|
||||||
require("absolute.core")
|
require("absolute.core")
|
||||||
require("absolute.lazy")
|
require("absolute.lazy")
|
||||||
require("absolute.helpers")
|
require("absolute.helpers")
|
||||||
require("absolute.remap")
|
require("absolute.remap")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
return {
|
return {
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- "theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
"nvim-neotest/nvim-nio",
|
"nvim-neotest/nvim-nio",
|
||||||
"nvim-telescope/telescope-dap.nvim",
|
"nvim-telescope/telescope-dap.nvim",
|
||||||
{ "mfussenegger/nvim-dap-python", ft = "python", dependencies = { "mfussenegger/nvim-dap" } },
|
{
|
||||||
|
"mfussenegger/nvim-dap-python",
|
||||||
|
ft = "python",
|
||||||
|
dependencies = { "mfussenegger/nvim-dap" },
|
||||||
|
},
|
||||||
-- "Pocco81/DAPInstall.nvim"
|
-- "Pocco81/DAPInstall.nvim"
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
"davidhalter/jedi-vim",
|
|
||||||
config = function()
|
|
||||||
require("absolute.after.jedi")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
15
lua/absolute/plugins/noice.lua
Normal file
15
lua/absolute/plugins/noice.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
dependencies = {
|
||||||
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- OPTIONAL:
|
||||||
|
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||||
|
-- If not available, we use `mini` as the fallback
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("absolute.after.noice")
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd([[:TSUpdate]])
|
vim.cmd([[:silent !TSUpdate]])
|
||||||
require("absolute.after.nvim-treesitter")
|
require("absolute.after.nvim-treesitter")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
"christopher-francisco/tmux-status.nvim",
|
|
||||||
lazy = true,
|
|
||||||
opts = {},
|
|
||||||
}
|
|
||||||
39
lua/absolute/utils/detect-lua.lua
Normal file
39
lua/absolute/utils/detect-lua.lua
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
function GetLuaPath(version)
|
||||||
|
local path = vim.fn.expand("$HOME") .. "/.luarocks/share/lua/" .. version .. "/?.lua;"
|
||||||
|
path = path .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/" .. version .. "/?/init.lua;"
|
||||||
|
return path
|
||||||
|
end
|
||||||
|
|
||||||
|
function GetInstalledLuaVersion()
|
||||||
|
-- List the directory contents of the lua rocks directory
|
||||||
|
local rocks = vim.fn.glob(vim.fn.expand("$HOME") .. "/.luarocks/share/lua/")
|
||||||
|
|
||||||
|
-- Split the string into a table
|
||||||
|
|
||||||
|
rocks = vim.split(rocks, "\n")
|
||||||
|
|
||||||
|
-- Sort the table highest to lowest
|
||||||
|
|
||||||
|
table.sort(rocks, function(a, b)
|
||||||
|
return tonumber(a) > tonumber(b)
|
||||||
|
end)
|
||||||
|
|
||||||
|
return rocks
|
||||||
|
end
|
||||||
|
|
||||||
|
function GetLatestLuaVersion()
|
||||||
|
local rocks = GetInstalledLuaVersion()
|
||||||
|
local preferredVersion = rocks[1]
|
||||||
|
|
||||||
|
local path = GetLuaPath(preferredVersion)
|
||||||
|
|
||||||
|
return path
|
||||||
|
end
|
||||||
|
|
||||||
|
M = {}
|
||||||
|
|
||||||
|
M.GetLuaPath = GetLuaPath
|
||||||
|
M.GetInstalledLuaVersion = GetInstalledLuaVersion
|
||||||
|
M.GetLatestLuaVersion = GetLatestLuaVersion
|
||||||
|
|
||||||
|
return M
|
||||||
33
lua/absolute/utils/detect-python-env.lua
Normal file
33
lua/absolute/utils/detect-python-env.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
function CheckPoetryVirtualEnv()
|
||||||
|
local poetry = vim.fn.system("poetry env info -p 2>/dev/null")
|
||||||
|
if poetry == "" then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
return poetry
|
||||||
|
end
|
||||||
|
|
||||||
|
function ResolvePythonEnvironment()
|
||||||
|
-- Get system global python env
|
||||||
|
local python = vim.fn.system("which python3")
|
||||||
|
-- Check of virtual environments exists
|
||||||
|
local virtual = os.getenv("VIRTUAL_ENV") or os.getenv("CONDA_PREFIX") or CheckPoetryVirtualEnv()
|
||||||
|
|
||||||
|
if virtual == nil then
|
||||||
|
-- Check if poetry environment exists
|
||||||
|
|
||||||
|
return {
|
||||||
|
"--python-executable", python
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"--python-executable", virtual .. "/bin/python"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
M = {}
|
||||||
|
|
||||||
|
M.ResolvePythonEnvironment = ResolvePythonEnvironment
|
||||||
|
M.CheckPoetryVirtualEnv = CheckPoetryVirtualEnv
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -1 +1 @@
|
|||||||
vim.cmd("colorscheme catppuccin-mocha")
|
vim.cmd("colorscheme catppuccin")
|
||||||
Reference in New Issue
Block a user