Skip to content
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
1 change: 1 addition & 0 deletions fish/.aliases.fish
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ if $is_darwin
alias slack="open /Applications/Slack.app"
alias sqlwb="open /Applications/DataGrip.app"
alias xbrew='arch -x86_64 /usr/local/bin/brew'
alias gwml='cd ~/Library/Mobile Documents/com~apple~CloudDocs/Data/src/ml/deep-learning'
end

if test -f /etc/os-release
Expand Down
2 changes: 1 addition & 1 deletion fish/.exports.fish
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set -gx FZF_ALT_C_OPTS "--preview 'eza --all --color=always'"
pyenv init - | source
starship init fish | source
zoxide init fish | source
# docker completion fish | source
gh completion -s fish | source
poetry completions fish | source

# keeping these for the next time I need rust or K8s
# docker completion fish | source
# helm completion fish | source
# kubectl completion fish | source
# rustup completions fish | source
Expand Down
165 changes: 81 additions & 84 deletions nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,91 +100,88 @@ cmp.setup.cmdline(':', {
-- Set up lspconfig
local capabilities = require('cmp_nvim_lsp').default_capabilities()

-- In your plugins.lua file
local capabilities = require('cmp_nvim_lsp').default_capabilities()

-- Configure Python LSP (pyright)
vim.lsp.config('pyright', {
settings = {
python = {
analysis = {
ignore = { '*' },
autoSearchPaths = true,
diagnosticMode = "workspace",
useLibraryCodeForTypes = true,
typeCheckingMode = "basic"
}
}
}
})

vim.lsp.enable('pyright')

local function get_poetry_python()
local handle = io.popen("poetry env info -p")
if handle then
local result = handle:read("*a")
handle:close()
local venv_path = vim.fn.trim(result)
return venv_path .. "/bin/python"
else
-- print("Could not find poetry environment")
return "/usr/bin/python3" -- os.getenv("HOME") .. "/.virtualenvs/debugpy/bin/python",
end
end

local dap = require("dap")
dap.adapters.python = {
type = "executable",
command = get_poetry_python(),
args = { "-m", "debugpy.adapter" },
}
dap.configurations.python = {
{
type = "python",
request = "launch",
name = "Launch file in pytest",
module = "pytest",
args = { "${file}" },
console = "integratedTerminal",
pythonPath = get_poetry_python
}
}

local dapui = require("dapui")
dapui.setup({
layouts = {
{
elements = {
{ id = "scopes", size = 0.75 },
{ id = "breakpoints", size = 0.25 },
{ id = "stacks", size = 0.25 },
},
size = 40, -- columns
position = "left", -- can be "left" or "right"
},
{
elements = {
{ id = "repl", size = 0.5 },
{ id = "console", size = 0.5 },
},
size = 15, -- lines
position = "bottom", -- can be "bottom" or "top"
},
},
controls = {
enabled = true,
element = "repl",
icons = {
pause = "⏸", play = "▶", step_into = "⤵", step_over = "⤼",
step_out = "⤴", step_back = "⏪", run_last = "↻", terminate = "⏹"
},
},
})

dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
-- vim.lsp.config('pyright', {
-- settings = {
-- python = {
-- analysis = {
-- ignore = { '*' },
-- autoSearchPaths = true,
-- diagnosticMode = "workspace",
-- useLibraryCodeForTypes = true,
-- typeCheckingMode = "basic"
-- }
-- }
-- }
-- })
--
-- vim.lsp.enable('pyright')
--
-- local function get_poetry_python()
-- local handle = io.popen("poetry env info -p")
-- if handle then
-- local result = handle:read("*a")
-- handle:close()
-- local venv_path = vim.fn.trim(result)
-- return venv_path .. "/bin/python"
-- else
-- -- print("Could not find poetry environment")
-- return "/usr/bin/python3" -- os.getenv("HOME") .. "/.virtualenvs/debugpy/bin/python",
-- end
-- end
--
-- local dap = require("dap")
-- dap.adapters.python = {
-- type = "executable",
-- command = get_poetry_python(),
-- args = { "-m", "debugpy.adapter" },
-- }
-- dap.configurations.python = {
-- {
-- type = "python",
-- request = "launch",
-- name = "Launch file in pytest",
-- module = "pytest",
-- args = { "${file}" },
-- console = "integratedTerminal",
-- pythonPath = get_poetry_python
-- }
-- }
--
-- local dapui = require("dapui")
-- dapui.setup({
-- layouts = {
-- {
-- elements = {
-- { id = "scopes", size = 0.75 },
-- { id = "breakpoints", size = 0.25 },
-- { id = "stacks", size = 0.25 },
-- },
-- size = 40, -- columns
-- position = "left", -- can be "left" or "right"
-- },
-- {
-- elements = {
-- { id = "repl", size = 0.5 },
-- { id = "console", size = 0.5 },
-- },
-- size = 15, -- lines
-- position = "bottom", -- can be "bottom" or "top"
-- },
-- },
-- controls = {
-- enabled = true,
-- element = "repl",
-- icons = {
-- pause = "⏸", play = "▶", step_into = "⤵", step_over = "⤼",
-- step_out = "⤴", step_back = "⏪", run_last = "↻", terminate = "⏹"
-- },
-- },
-- })
--
-- dap.listeners.after.event_initialized["dapui_config"] = function()
-- dapui.open()
-- end
-- TODO: set up typescript support
-- TypeScript/JavaScript
-- require('lspconfig')['tsserver'].setup {
Expand Down
Loading