diff --git a/doomemacs/.doom.d/custom.el b/doomemacs/.doom.d/custom.el index c65db52..758e730 100644 --- a/doomemacs/.doom.d/custom.el +++ b/doomemacs/.doom.d/custom.el @@ -3,6 +3,8 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. + '(custom-safe-themes + '("2dd4951e967990396142ec54d376cced3f135810b2b69920e77103e0bcedfba9" default)) '(elcord-display-buffer-details nil) '(elcord-display-elapsed t) '(elcord-display-line-numbers nil) @@ -12,7 +14,8 @@ '(elcord-idle-message "Thinking...") '(elcord-mode t nil (elcord)) '(elcord-quiet t) - '(package-selected-packages '(elcord quelpa eldoc-cmake cpputils-cmake)) + '(package-selected-packages + '(elcord quelpa eldoc-cmake cpputils-cmake)) '(warning-suppress-types '((initialization) (defvaralias)))) (custom-set-faces ;; custom-set-faces was added by Custom. diff --git a/doomemacs/.doom.d/init.el b/doomemacs/.doom.d/init.el index 8279616..b710d50 100644 --- a/doomemacs/.doom.d/init.el +++ b/doomemacs/.doom.d/init.el @@ -37,8 +37,8 @@ ;;hydra ;;indent-guides ; highlighted indent columns ligatures ; ligatures and symbols to make your code pretty again - ;; minimap ; show a map of the code on the side - ;; modeline ; snazzy, Atom-inspired modeline, plus API + minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink cursor line after big motions neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on @@ -121,7 +121,7 @@ ;;common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c - csharp ; unity, .NET, and mono shenanigans + (csharp +lsp) ; unity, .NET, and mono shenanigans ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;dhall @@ -144,38 +144,38 @@ json ; At least it ain't XML (java +lsp) ; the poster child for carpal tunnel syndrome javascript ; all(hope(abandon(ye(who(enter(here)))))) - ;;julia ; a better, faster MATLAB - ;;kotlin ; a better, slicker Java(Script) + julia ; a better, faster MATLAB + kotlin ; a better, slicker Java(Script) latex ; writing papers in Emacs has never been so fun ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be - lua ; one-based indices? one-based indices + (lua +lsp) ; one-based indices? one-based indices markdown ; writing docs for people to ignore - ;;nim ; python + lisp at the speed of c - ;;nix ; I hereby declare "nix geht mehr!" - ;;ocaml ; an objective camel + nim ; python + lisp at the speed of c + nix ; I hereby declare "nix geht mehr!" + ocaml ; an objective camel org ; organize your plain life in plain text - ;;php ; perl's insecure younger brother + php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;; purescript ; javascript, but functional - python ; beautiful is better than ugly + (python +lsp) ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 ;;rest ; Emacs as a REST client ;;rst ; ReST in peace (ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - ;;scala ; java, but good + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + (scala +lsp) ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor ;;sml ;;solidity ; do you need a blockchain? No. - ;;swift ; who asked for emoji variables? + (swift +lsp) ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - ;;web ; the tubes + web ; the tubes yaml ; JSON, but readable - ;;zig ; C, but simpler + (zig +lsp) ; C, but simpler :email ;;(mu4e +org +gmail) @@ -193,3 +193,7 @@ :config ;;literate (default +bindings +smartparens)) + + +(after! lsp-pyls + (setq lsp-pyls-plugins-pycodestyle-ignore '("E501"))) diff --git a/nvim/.config/nvim/after/plugin/comment.lua b/nvim/.config/nvim/after/plugin/comment.lua new file mode 100644 index 0000000..a844323 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/comment.lua @@ -0,0 +1 @@ +require('Comment').setup() diff --git a/nvim/.config/nvim/after/plugin/lsp.lua b/nvim/.config/nvim/after/plugin/lsp.lua new file mode 100644 index 0000000..8d8592f --- /dev/null +++ b/nvim/.config/nvim/after/plugin/lsp.lua @@ -0,0 +1,48 @@ +local lsp = require("lsp-zero") + +lsp.preset("recommended") + +lsp.ensure_installed({ + "tsserver", + "eslint", + "lua_ls", + "rust_analyzer", + "pyright", +}) + +local cmp = require("cmp") +local cmp_select = { behavior = cmp.SelectBehavior.Select } +local cmp_mappings = lsp.defaults.cmp_mappings({ + [""] = cmp.mapping.select_prev_item(cmp_select), + [""] = cmp.mapping.select_next_item(cmp_select), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.complete(), +}) + +lsp.set_preferences({ + sign_icons = {} +}) + +lsp.setup_nvim_cmp({ + mapping = cmp_mappings +}) + +lsp.on_attach(function(client, bufnr) + local opts = { buffer = bufnr, remap = false } + + vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) + vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) + vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) + vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) + vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) + vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) + vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) + vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts) + vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) + vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) + vim.keymap.set("n", "", function() + vim.lsp.buf.format { async = true } + end, opts) +end) + +lsp.setup() diff --git a/nvim/.config/nvim/after/plugin/lualine.lua b/nvim/.config/nvim/after/plugin/lualine.lua new file mode 100644 index 0000000..9814cae --- /dev/null +++ b/nvim/.config/nvim/after/plugin/lualine.lua @@ -0,0 +1 @@ +require("lualine").setup() diff --git a/nvim/.config/nvim/after/plugin/presence.lua b/nvim/.config/nvim/after/plugin/presence.lua new file mode 100644 index 0000000..d7dcc05 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/presence.lua @@ -0,0 +1,23 @@ +require("presence").setup({ + -- General options + auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`) + neovim_image_text = "Neovim", -- Text displayed when hovered over the Neovim image + main_image = "file", -- Main image display (either "neovim" or "file") + client_id = "793271441293967371", -- Use your own Discord application client id (not recommended) + log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") + debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) + enable_line_number = false, -- Displays the current line number instead of the current project + blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches + buttons = false, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "