Skip to content

Commit 6e48802

Browse files
committed
this ones for olestrohm
1 parent b2e4e69 commit 6e48802

15 files changed

Lines changed: 208 additions & 44 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
-- Don't do comment stuffs when I use o/O
22
vim.opt_local.formatoptions:remove "o"
3+
4+
vim.keymap.set("n", "<F5>", function()
5+
if require("dap").session() then
6+
require("dap").continue()
7+
else
8+
R("tj.dap").select_rust_runnable()
9+
end
10+
end)

xdg_config/nvim/after/plugin/dap.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,23 @@
33
-- - make the virt lines thing available if ppl want it
44
-- - find the nearest codelens above cursor
55

6+
-- Must Show:
7+
-- - Connect to an existing neovim instance, and step through some plugin
8+
-- - Connect using configuration from VS **** json file (see if VS **** is actually just "it works" LUL)
9+
-- - Completion in the repl, very cool for exploring objects / data
10+
11+
-- - Generating your own config w/ dap.run (can show rust example) (rust BTW)
12+
613
local has_dap, dap = pcall(require, "dap")
714
if not has_dap then
815
return
916
end
1017

18+
vim.fn.sign_define("DapBreakpoint", { text = "ß", texthl = "", linehl = "", numhl = "" })
19+
vim.fn.sign_define("DapBreakpointCondition", { text = "ü", texthl = "", linehl = "", numhl = "" })
20+
-- Setup cool Among Us as avatar
21+
vim.fn.sign_define("DapStopped", { text = "", texthl = "Error" })
22+
1123
require("nvim-dap-virtual-text").setup {
1224
enabled = true,
1325

@@ -341,6 +353,11 @@ dap.configurations.python = {
341353

342354
local dap_python = require "dap-python"
343355
dap_python.setup("python", {
356+
-- So if configured correctly, this will open up new terminal.
357+
-- Could probably get this to target a particular terminal
358+
-- and/or add a tab to kitty or something like that as well.
359+
console = "externalTerminal",
360+
344361
include_configs = true,
345362
})
346363

xdg_config/nvim/after/plugin/statusline.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ require("fidget").setup {
151151
align = {
152152
bottom = true,
153153
},
154+
window = {
155+
relative = "editor",
156+
},
154157
}
155158

156159
--[[

xdg_config/nvim/after/plugin/treesitter.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ local _ = require("nvim-treesitter.configs").setup {
8484
},
8585
},
8686

87-
-- TODO: This seems broken...
8887
navigation = {
8988
enable = false,
9089
keymaps = {
@@ -123,6 +122,7 @@ local _ = require("nvim-treesitter.configs").setup {
123122
set_jumps = true,
124123

125124
goto_next_start = {
125+
["]p"] = "@parameter.inner",
126126
["]m"] = "@function.outer",
127127
["]]"] = "@class.outer",
128128
},
@@ -131,6 +131,7 @@ local _ = require("nvim-treesitter.configs").setup {
131131
["]["] = "@class.outer",
132132
},
133133
goto_previous_start = {
134+
["[p"] = "@parameter.inner",
134135
["[m"] = "@function.outer",
135136
["[["] = "@class.outer",
136137
},

xdg_config/nvim/lua/tj/dap.lua

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
--[[
2+
3+
enrich_config = function(config, on_config)
4+
local final_config = vim.deepcopy(config)
5+
final_config.extra_property = 'This got injected by the adapter'
6+
on_config(final_config)
7+
end;
8+
9+
--]]
10+
111
local Job = require "plenary.job"
212
local dap = require "dap"
313

@@ -119,7 +129,7 @@ M.debug_rust_runnable = function(item)
119129
for _, value in pairs(j:result()) do
120130
local json = vim.fn.json_decode(value)
121131
if type(json) == "table" and json.executable ~= vim.NIL and json.executable ~= nil then
122-
local dap_config = {
132+
dap.run {
123133
name = "Rust tools debug",
124134
type = "rt_lldb",
125135
request = "launch",
@@ -129,8 +139,6 @@ M.debug_rust_runnable = function(item)
129139
stopOnEntry = false,
130140
runInTerminal = false,
131141
}
132-
133-
dap.run(dap_config)
134142
break
135143
end
136144
end

xdg_config/nvim/lua/tj/lsp/init.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local telescope_mapper = require "tj.telescope.mappings"
1414
local handlers = require "tj.lsp.handlers"
1515

1616
-- Can set this lower if needed.
17-
require("vim.lsp.log").set_level "debug"
17+
-- require("vim.lsp.log").set_level "debug"
1818
-- require("vim.lsp.log").set_level "trace"
1919

2020
local status = require "tj.lsp.status"
@@ -147,6 +147,7 @@ local servers = {
147147
pyright = true,
148148
vimls = true,
149149
yamlls = true,
150+
eslint = true,
150151

151152
cmake = (1 == vim.fn.executable "cmake-language-server"),
152153
dartls = pcall(require, "flutter-tools"),
@@ -195,7 +196,9 @@ local servers = {
195196
cmd = { vim.fn.expand "~/build/omnisharp/run", "--languageserver", "--hostPID", tostring(vim.fn.getpid()) },
196197
},
197198

198-
rust_analyzer = true,
199+
rust_analyzer = {
200+
cmd = { "rustup", "run", "nightly", "rust-analyzer" },
201+
},
199202
-- settings = {
200203
-- ["rust-analyzer"] = {
201204
-- },

xdg_config/nvim/lua/tj/plugins.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ return require("packer").startup {
101101
ft = { "flutter", "dart" },
102102
}
103103

104+
use "/home/tjdevries/plugins/stackmap.nvim"
105+
-- Plug "/home/bash/plugins/stackmap.nvim"
106+
104107
-- use "simrat39/rust-tools.nvim"
105108
-- use "ray-x/go.nvim"
106109
-- use "jose-elias-alvarez/nvim-lsp-ts-utils"
@@ -342,7 +345,7 @@ return require("packer").startup {
342345
-- I don't write enough typescript to think about this.
343346
use {
344347
"prettier/vim-prettier",
345-
ft = { "html", "javascript", "typescript" },
348+
ft = { "html", "javascript", "typescript", "typescriptreact" },
346349
run = "yarn install",
347350
}
348351

xdg_config/nvim/lua/tj/snips/ft/lua.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ return {
4747
},
4848

4949
-- TODO: I don't know how I would like to set this one up.
50-
f = { "function(", i(1), ")", i(0), newline "end" },
50+
f = fmt("function({})\n {}\nend", { i(1), i(0) }),
5151

5252
test = { "mirrored: ", i(1), " // ", same(1), " | ", i(0) },
5353

xdg_config/nvim/lua/tj/telescope/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function M.git_files()
200200
path = nil
201201
end
202202

203-
local width = 0.25
203+
local width = 0.75
204204
if path and string.find(path, "sourcegraph.*sourcegraph", 1, false) then
205205
width = 0.5
206206
end

0 commit comments

Comments
 (0)