Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rust #96

Merged
merged 2 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion home/.config/nvim/after/plugin/dap.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local dap, dapui = require("dap"), require("dapui")
require("mason-nvim-dap").setup({
ensure_installed = { "delve" },
ensure_installed = { "delve", "codelldb" },
automatic_installation = true,
})

Expand Down
1 change: 1 addition & 0 deletions home/.config/nvim/after/plugin/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ require('mason-lspconfig').setup({
'cssls',
'dockerls',
'biome',
'rust_analyzer',
'html',
'htmx',
'sqlls',
Expand Down
23 changes: 23 additions & 0 deletions home/.config/nvim/after/plugin/rustaceanvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
vim.g.rustaceanvim = function()
-- Update this path
local extension_path = vim.env.HOME .. '/.vscode/extensions/vadimcn.vscode-lldb-1.10.0/'
local codelldb_path = extension_path .. 'adapter/codelldb'
local liblldb_path = extension_path .. 'lldb/lib/liblldb'
local this_os = vim.uv.os_uname().sysname;

-- The path is different on Windows
if this_os:find "Windows" then
codelldb_path = extension_path .. "adapter\\codelldb.exe"
liblldb_path = extension_path .. "lldb\\bin\\liblldb.dll"
else
-- The liblldb extension is .so for Linux and .dylib for MacOS
liblldb_path = liblldb_path .. (this_os == "Linux" and ".so" or ".dylib")
end

local cfg = require('rustaceanvim.config')
return {
dap = {
adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
},
}
end
2 changes: 1 addition & 1 deletion home/.config/nvim/after/plugin/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'nvim-treesitter.configs'.setup {
ensure_installed = { "markdown", "markdown_inline", "go", "typescript", "dockerfile", "ssh_config", "sql", "json", "jsdoc", "lua", "vim", "javascript" },
ensure_installed = { "markdown", "markdown_inline", "go", "typescript", "dockerfile", "ssh_config", "sql", "json", "jsdoc", "lua", "vim", "javascript", "rust" },
sync_install = false,
auto_install = true,
indent = {
Expand Down
3 changes: 3 additions & 0 deletions home/.config/nvim/lua/zetxx/plug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ Plug('microsoft/vscode-js-debug', { ['do'] = 'npm install --legacy-peer-deps &&
Plug('sainnhe/sonokai')
Plug('EdenEast/nightfox.nvim')

-- Other
--- Rust
Plug('mrcjkb/rustaceanvim', {['version'] = '^5'})
vim.call('plug#end')
3 changes: 2 additions & 1 deletion home/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ alias npmi='npm i --cache "/tmp/cache.$RANDOM"'
#export CONTAINERD_ROOTLES_SOCK="$(cat /run/user/1000/containerd-rootless/child_pid)"
export NODE_ENV=development
export NODE_PATH=$(npm root --quiet -g)
export NODE_GLOB_ROOT=$(npm config get prefix)
export GOPATH=/home/zetxx/go
export GOBIN=${GOPATH}/bin
export PATH=${PATH}:${NODE_PATH}:$(go env GOBIN):$(npm config get prefix)/bin
export PATH=${PATH}:${NODE_GLOB_ROOT}:$HOME/.cargo/bin:$(go env GOBIN):${NODE_PATH}:$(npm config get prefix)/bin
export BUILDKIT_PROGRESS=plain
alias exo-open-term='exo-open --launch TerminalEmulator'
source $HOME/.tokens.sh
Expand Down