Compare commits
6 Commits
bc2f2a0e1c
...
9351fb8460
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9351fb8460 | ||
|
|
34c1c17f41 | ||
| 64d140824a | |||
|
|
2aecb35c01 | ||
|
|
47e8a9ab79 | ||
| b7c9e480db |
@ -1,7 +1,8 @@
|
||||
require('user.plugins') -- First to install packer
|
||||
--require('plugins.nord')
|
||||
require('user.settings')
|
||||
require('user.plugins')
|
||||
require('user.keys')
|
||||
--require('plugins.rust')
|
||||
require('plugins.lspconfig')
|
||||
require('plugins.null-ls')
|
||||
require('plugins.cmp')
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect', 'preview'}
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true}
|
||||
vim.api.nvim_set_option('updatetime', 1000)
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
@ -17,10 +19,11 @@ cmp.setup({
|
||||
{name = 'path'},
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'nvim_lsp_signature_help'},
|
||||
{name = 'buffer'},
|
||||
{name = 'luasnip'},
|
||||
{name = 'buffer', keyword_length = 2},
|
||||
{name = 'luasnip', keyword_length = 2},
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
formatting = {
|
||||
@ -28,10 +31,10 @@ cmp.setup({
|
||||
format = function(entry, item)
|
||||
local menu_icon = {
|
||||
nvim_lsp = 'λ',
|
||||
nvim_lsp_signature_help = 'λ',
|
||||
nvim_lsp_signature_help = 'λ“',
|
||||
luasnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
path = '»',
|
||||
}
|
||||
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
require("dap-vscode-js").setup({
|
||||
-- node_path = "node", -- Path of node executable. Defaults to $NODE_PATH, and then "node"
|
||||
-- debugger_path = "(runtimedir)/site/pack/packer/opt/vscode-js-debug", -- Path to vscode-js-debug installation.
|
||||
@ -10,8 +8,10 @@ require("dap-vscode-js").setup({
|
||||
-- log_console_level = vim.log.levels.ERROR -- Logging level for output to console. Set to false to disable console output.
|
||||
})
|
||||
|
||||
local dap = require('dap')
|
||||
|
||||
for _, language in ipairs({ "typescript", "javascript" }) do
|
||||
require("dap").configurations[language] = {
|
||||
dap.configurations[language] = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
@ -22,8 +22,39 @@ for _, language in ipairs({ "typescript", "javascript" }) do
|
||||
}
|
||||
end
|
||||
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = '/usr/bin/codelldb',
|
||||
args = {"--port", "${port}"},
|
||||
}
|
||||
}
|
||||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Rust debug",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
vim.fn.jobstart('cargo build')
|
||||
-- cargo metadata --no-deps --format-version 1 | jq -r '.target_directory'
|
||||
-- cargo metadata --no-deps --format-version 1 | jq -r '.packages[].targets[] | select( .kind | map(. == "bin") | any ) | .name'
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = true,
|
||||
showDisassembly = "never",
|
||||
},
|
||||
}
|
||||
|
||||
local dapui = require('dapui')
|
||||
dapui.setup()
|
||||
require("nvim-dap-virtual-text").setup()
|
||||
|
||||
vim.keymap.set('n', '<Leader>du', dapui.toggle)
|
||||
vim.keymap.set('n', '<Leader>b', dap.toggle_breakpoint)
|
||||
vim.keymap.set('n', '<Leader>c', dap.continue)
|
||||
vim.keymap.set('n', '<Leader>o', dap.step_over)
|
||||
vim.keymap.set('n', '<Leader>i', dap.step_into)
|
||||
vim.keymap.set('n', '<Leader>q', dap.terminate)
|
||||
|
||||
@ -30,7 +30,27 @@ require'lspconfig'.tsserver.setup({
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
}
|
||||
},
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = 'clippy'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
require'lspconfig'.rust_analyzer.setup {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = 'all',
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = { "typescript", "lua", "rust" },
|
||||
ensure_installed = { "typescript", "lua", "rust", "toml" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
@ -90,6 +90,7 @@ return require('packer').startup(function()
|
||||
}
|
||||
|
||||
use 'mfussenegger/nvim-dap'
|
||||
use 'mfussenegger/nvim-jdtls' -- Java
|
||||
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }
|
||||
use { "mxsdev/nvim-dap-vscode-js", requires = {"mfussenegger/nvim-dap"} }
|
||||
use {
|
||||
|
||||
@ -63,3 +63,6 @@ endfunction
|
||||
]]
|
||||
|
||||
vim.cmd[[command! -nargs=* -bang RG call RipgrepFzf(<q-args>, <bang>0)]]
|
||||
|
||||
-- Rust
|
||||
vim.g.rustfmt_autosave = 1
|
||||
|
||||
@ -209,6 +209,11 @@ _G.packer_plugins = {
|
||||
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nvim-dap-vscode-js",
|
||||
url = "https://github.com/mxsdev/nvim-dap-vscode-js"
|
||||
},
|
||||
["nvim-jdtls"] = {
|
||||
loaded = true,
|
||||
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nvim-jdtls",
|
||||
url = "https://github.com/mfussenegger/nvim-jdtls"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
@ -234,6 +239,11 @@ _G.packer_plugins = {
|
||||
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
["rust-tools.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/rust-tools.nvim",
|
||||
url = "https://github.com/simrat39/rust-tools.nvim"
|
||||
},
|
||||
["rust.vim"] = {
|
||||
loaded = true,
|
||||
path = "/home/patrick/.local/share/nvim/site/pack/packer/start/rust.vim",
|
||||
|
||||
@ -128,13 +128,6 @@
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
||||
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
|
||||
},
|
||||
"custom/headset": {
|
||||
"format": " {}",
|
||||
"on-click": "$HOME/.config/waybar/connect_headset.sh",
|
||||
"interval": 10,
|
||||
"return-type": "json",
|
||||
"exec": "$HOME/.config/waybar/check_headset.sh"
|
||||
},
|
||||
"custom/separator": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
|
||||
1
.tmux/plugins/nord-tmux
Submodule
1
.tmux/plugins/nord-tmux
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6cc353def1121c94bc6717dbc6f5a97af41f8e55
|
||||
1
.tmux/plugins/tmux-sensible
Submodule
1
.tmux/plugins/tmux-sensible
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa
|
||||
1
.tmux/plugins/tpm
Submodule
1
.tmux/plugins/tpm
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946
|
||||
12
.zshrc
12
.zshrc
@ -86,7 +86,7 @@ fi
|
||||
|
||||
export LANG=en_GB.UTF-8
|
||||
export LC_CTYPE=en_GB.UTF-8
|
||||
export EDITOR='vim'
|
||||
export EDITOR='nvim'
|
||||
|
||||
# FZF
|
||||
export FZF_DEFAULT_COMMAND='fd --type f'
|
||||
@ -94,6 +94,16 @@ export FZF_DEFAULT_COMMAND='fd --type f'
|
||||
# RIPGREP
|
||||
export RIPGREP_CONFIG_PATH="${HOME}/.ripgrep"
|
||||
|
||||
# Java Wayland fix
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
||||
# tabtab source for packages
|
||||
# uninstall by removing these lines
|
||||
[[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true
|
||||
|
||||
# Let GPG know which TTY to send password question to
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Add JBang to environment
|
||||
alias j!=jbang
|
||||
export PATH="$HOME/.jbang/bin:$PATH"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user