diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/alacritty/alacritty.linux.yml | 2 | ||||
| -rw-r--r-- | config/fish/config.fish | 3 | ||||
| -rw-r--r-- | config/git/config.linux | 4 | ||||
| -rw-r--r-- | config/helix/config.toml | 1 | ||||
| -rw-r--r-- | config/mimeapps.list | 2 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 163 | ||||
| -rw-r--r-- | config/zsh/.zshrc | 1 |
7 files changed, 116 insertions, 60 deletions
diff --git a/config/alacritty/alacritty.linux.yml b/config/alacritty/alacritty.linux.yml index 74111be..1b70eb5 100644 --- a/config/alacritty/alacritty.linux.yml +++ b/config/alacritty/alacritty.linux.yml @@ -9,7 +9,7 @@ env: # font font: - size: 9.0 + size: 11.0 offset: x: 0 y: 0 diff --git a/config/fish/config.fish b/config/fish/config.fish index 65b477f..9418952 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -18,6 +18,9 @@ set -gx PATH "$PATH:$HOME/.local/bin" set -gx PATH "$PATH:$HOME/git/odin" set -gx PATH "$PATH:$HOME/git/ols" +# ESP32 rust toolchain +. "$HOME/export-esp.sh" + # applications set -gx EDITOR 'nvim' set -gx TERMINAL 'alacritty' diff --git a/config/git/config.linux b/config/git/config.linux index 1e93196..6a34386 100644 --- a/config/git/config.linux +++ b/config/git/config.linux @@ -17,8 +17,8 @@ prompt = false [mergetool "vimdiff"] cmd = "nvim -d $MERGED $LOCAL $BASE $REMOTE -c 'wincmd J | wincmd ='" -[commit] - gpgsign = true +; [commit] +; gpgsign = true [init] defaultBranch = master [difftool "bat"] diff --git a/config/helix/config.toml b/config/helix/config.toml new file mode 100644 index 0000000..22b9b7c --- /dev/null +++ b/config/helix/config.toml @@ -0,0 +1 @@ +theme = "gruvbox" diff --git a/config/mimeapps.list b/config/mimeapps.list index 9198139..1b2f842 100644 --- a/config/mimeapps.list +++ b/config/mimeapps.list @@ -8,7 +8,7 @@ # text/x-shellscript=text.desktop; # x-scheme-handler/magnet=torrent.desktop; # application/x-bittorrent=torrent.desktop; -x-scheme-handler/mailto=st-mutt.desktop; +x-scheme-handler/mailto=brave-browser.desktop # text/plain=text.desktop; application/postscript=zathura.desktop; application/pdf=zathura.desktop; diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 7741484..bfc4440 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -1,5 +1,21 @@ vim.cmd [[ packadd packer.nvim ]] + +local on_attach = function(_, bufnr) + local opts = { noremap = true, silent = true } + local map = function(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end + map("n", "<leader>[", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) + map("n", "<leader>]", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) + map("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) + map("n", "gk", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) + map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) + map("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts) + map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts) + map("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) + map("n", "<leader>q", "<cmd>Telescope diagnostics<CR>", opts) + map("n", "<leader>p", "<cmd>Telescope lsp_workspace_symbols<CR>", opts) +end + return require("packer").startup(function() use "wbthomason/packer.nvim" -- plugin manager (can manage itself) use "AndrewRadev/sideways.vim" -- Move arguments sideways @@ -7,6 +23,31 @@ return require("packer").startup(function() use "romainl/vim-cool" -- only highlight search matches when searching use "lukas-reineke/indent-blankline.nvim" + use { + "ellisonleao/glow.nvim", + config = function() require("glow").setup() end + } + + use { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + requires = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + }, + config = function() + require("neo-tree").setup({ + window = { + mappings = { + ["<c-x>"] = "open_split", + ["<c-v>"] = "open_vsplit",} + }, + }) + end, + } + -- use { -- "lewis6991/satellite.nvim", -- config = function () @@ -14,12 +55,12 @@ return require("packer").startup(function() -- end -- } - use { - 'andymass/vim-matchup', - setup = function() - vim.g.matchup_matchparen_offscreen = { method = "popup" } - end - } + -- use { + -- 'andymass/vim-matchup', + -- setup = function() + -- vim.g.matchup_matchparen_offscreen = { method = "popup" } + -- end + -- } -- Put arguments on multiple lines use { @@ -68,26 +109,13 @@ return require("packer").startup(function() -- nvim lsp configuration use { "neovim/nvim-lspconfig", - ft = {"rust", "python", "c", "cpp", "lua", "go", "haskell", "ocaml", "zig", "yaml", "odin"}, +-- "rust", + ft = {"python", "c", "cpp", "lua", "go", "haskell", "ocaml", "zig", "yaml", "odin"}, config = function() vim.diagnostic.config { signs = false, update_in_insert = false, } - local on_attach = function(_, bufnr) - local opts = { noremap = true, silent = true } - local map = function(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - map("n", "<leader>[", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) - map("n", "<leader>]", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) - map("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) - map("n", "gk", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) - map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) - map("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts) - map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts) - map("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) - map("n", "<leader>q", "<cmd>Telescope diagnostics<CR>", opts) - map("n", "<leader>p", "<cmd>Telescope lsp_workspace_symbols<CR>", opts) - end local lspconfig = require("lspconfig") local capabilities = require("cmp_nvim_lsp").default_capabilities( vim.lsp.protocol.make_client_capabilities() @@ -126,8 +154,7 @@ return require("packer").startup(function() "BufWritePre", { callback = go_import_callback, pattern = "*.go", group = augroup } ) - -- lspconfig.clangd.setup { on_attach = on_attach } - lspconfig.rust_analyzer.setup { on_attach = on_attach } + -- lspconfig.rust_analyzer.setup { on_attach = on_attach } -- need python-lsp-server and pyls-flake8 lspconfig.pylsp.setup { on_attach = on_attach, @@ -172,7 +199,7 @@ return require("packer").startup(function() lspconfig.hls.setup { on_attach = on_attach } -- opam install ocaml-lsp-server lspconfig.ocamllsp.setup { on_attach = on_attach } - lspconfig.clangd.setup { on_attach = on_attach } + lspconfig.clangd.setup { on_attach = on_attach, cmd = {"clangd", "-header-insertion=never"} } -- pacman -S zls lspconfig.zls.setup{} -- pacman -S yaml-language-server @@ -190,7 +217,9 @@ return require("packer").startup(function() ["http://json.schemastore.org/kustomization"] = "kustomization.{yml,yaml}", ["http://json.schemastore.org/ansible-playbook"] = "*play*.{yml,yaml}", ["http://json.schemastore.org/chart"] = "Chart.{yml,yaml}", - ["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}", + -- ["https://json.schemastore.org/gitlab-ci"] = "*gitlab-ci*.{yml,yaml}", + ["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = "*gitlab-ci*.{yml,yaml}", + ["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] = "*docker-compose*.{yml,yaml}", ["https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json"] = "*flow*.{yml,yaml}", }, @@ -201,36 +230,21 @@ return require("packer").startup(function() end, } - -- -- rust lsp (needs rust-analyser) - -- use { - -- "simrat39/rust-tools.nvim", - -- requires = {"neovim/nvim-lspconfig"}, - -- ft = {"rust"}, - -- config = function() - -- local on_attach = function(_, bufnr) - -- local opts = { noremap = true, silent = true } - -- local map = function(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - -- map("n", "<leader>[", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts) - -- map("n", "<leader>]", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) - -- map("n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts) - -- map("n", "gk", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts) - -- map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts) - -- map("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts) - -- map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts) - -- map("n", "<leader>q", "<cmd>Telescope diagnostics<CR>", opts) - -- map("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts) - -- end - -- require("rust-tools").setup { - -- server = { - -- on_attach = on_attach, - -- } - -- } - -- vim.diagnostic.config { - -- signs = false, - -- update_in_insert = false, - -- } - -- end - -- } + use { + "mrcjkb/rustaceanvim", + ft = {"rust"}, + config = function() + -- to toggle inlay hints + -- vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + -- vim.g.rustaceanvim.server.on_attach = on_attach + vim.diagnostic.config { + signs = false, + update_in_insert = false, + } + -- require("rustaceanvim") + -- vim.g.rustaceanvim.server.on_attach = on_attach + end, + } use { "hrsh7th/nvim-cmp", @@ -312,6 +326,42 @@ return require("packer").startup(function() end } + use { + "mfussenegger/nvim-dap", + requires = { + "rcarriga/nvim-dap-ui", + "nvim-telescope/telescope-dap.nvim", + "mfussenegger/nvim-dap-python", + }, + config = function() + local dap = require("dap") + require("dap-python").setup() + vim.keymap.set("n", "<F5>", ":lua require'dap'.continue()<CR>") + vim.keymap.set("n", "<F10>", ":lua require'dap'.step_over()<CR>") + vim.keymap.set("n", "<F11>", ":lua require'dap'.step_into()<CR>") + vim.keymap.set("n", "<F12>", ":lua require'dap'.step_out()<CR>") + vim.keymap.set("n", "<leader>b", ":lua require'dap'.toogle_breakpoint()<CR>") + -- vim.keymap.set("n", "<leader>B", ":lua require'dap'.toogle_breakpoint()<CR>") + vim.keymap.set("n", "<leader>dr", ":lua require'dap'.repl_open()<CR>") + + dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = {"-i", "dap"}, + } + dap.configurations.c = { + { + name = "Launch", + type = "gdb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end + }, + } + end + } + -- comment text objects use { "numToStr/Comment.nvim", @@ -399,6 +449,7 @@ return require("packer").startup(function() "c", "commonlisp", "cpp", + "cuda", "fish", "glsl", "go", @@ -492,7 +543,7 @@ return require("packer").startup(function() use { "lewis6991/gitsigns.nvim", - tag = 'release', + -- tag = 'release', config = function() require("gitsigns").setup { signcolumn = false, diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 2144d16..3b091f4 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -109,3 +109,4 @@ if [ "$(uname)" = 'Linux' ] && grep -q Arch /etc/os-release 2> /dev/null then . /usr/share/doc/pkgfile/command-not-found.zsh fi +. "/home/charles/.local/share/cargo/env" |
