Comments (1)
general.el toggle section
(sp/leader-keys
"t" '(nil :wk "toggles")
"te" '(eshell-toggle :wk "eshell")
"tv" '(vterm-other-window :wk "vterm(other)")
"tt" '(load-theme :wk "load theme")
"tr" '(rainbow-mode :wk "Colors")
"tn" '(neotree-toggle :wk "Neotree")
"tR" '(read-only-mode :wk "read only mode")
"tm" '(hide-mode-line-mode :wk "hide modeline mode"))
general.el project section
(sp/leader-keys
"p" '(nil :wk "Project")
"pf" '(project-find-file :wk "Files")
"pd" '(project-dired :wk "Dired")
"pr" '(project-query-replace-regexp :wk "Find and Replace")
"ps" '(project-search :wk "Search")
"pS" '(project-switch-project :wk "Switch Project"))
flycheck-inline
(use-package flycheck-inline
:hook (flycheck-mode . flycheck-inline-mode)
;; :custom
;; (flycheck-inline-display-function
;; (lambda (msg pos err)
;; (let* ((ov (quick-peek-overlay-ensure-at pos))
;; (contents (quick-peek-overlay-contents ov)))
;; (setf (quick-peek-overlay-contents ov)
;; (concat contents (when contents "\n") msg))
;; (quick-peek-update ov)))
;; flycheck-inline-clear-function #'quick-peek-hide)
)
company-mode
(use-package company
:hook ((prog-mode emacs-lisp-mode) . company-mode)
:preface
(defun my/company-backtab ()
(interactive)
(company-complete-common-or-cycle -1))
:custom
(company-show-quick-access t)
(company-idle-delay 0.0)
(company-tooltip-minimum-width 60)
(company-tooltip-maximum-width 60)
(company-tooltip-limit 12)
(company-tooltip-flip-when-above t)
(company-tooltip-idle-delay 0.2)
(company-async-wait 0.4)
(company-minimum-prefix-length 1)
(company-selection-wrap-around t)
(company-format-margin-function #'company-vscode-dark-icons-margin)
(company-tooltip-align-annotations t)
(company-frontends '(company-pseudo-tooltip-frontend
company-echo-metadata-frontend))
;; (company-backends
;; '((company-capf :with company-yasnippet)))
;; (company-backends
;; '((company-capf :with company-yasnippet)
;; (company-dabbrev-code :with company-yasnippet)
;; (company-keywords :with company-yasnippet)))
(company-backends '((company-capf
:with
company-yasnippet
company-dabbrev-code
company-files
company-dabbrev
company-keywords)))
(company-transformers '(company-sort-by-occurrence))
:bind
(:map company-active-map
("C-j" . company-select-next-or-abort)
("C-k" . company-select-previous-or-abort)
("C-w" . backward-kill-word)
("C-n" . company-select-next)
("C-p" . company-select-previous)
("C-s" . company-search-candidates)
("C-c" . company-search-abort)
("TAB" . company-select-next-or-abort)
([tab] . company-select-next-or-abort)
(([backtab] . company-select-previous-or-abort))))
format-all
(use-package format-all
:preface
(defun ian/format-code ()
"Auto-format whole buffer."
(interactive)
(let ((windowstart (window-start)))
(if (derived-mode-p 'prolog-mode)
(prolog-indent-buffer)
(format-all-buffer))
(set-window-start (selected-window) windowstart))
(message "Format-all completed"))
(defalias 'format-document #'ian/format-code)
:hook ((prog-mode emacs-lisp-mode) . format-all-mode)
:bind ([F6] . ian/format-code)
:config
(define-format-all-formatter prettierd
(:executable "prettierd")
(:install "npm install --global @fsouza/prettierd")
(:languages
"CSS" "HTML" "JavaScript" "JSON" "JSON5" "JSX" "Less" "Markdown" "PHP" "SCSS" "TSX" "TypeScript" "YAML" "RJSX")
(:features)
(:format (format-all--buffer-easy executable (or (buffer-file-name) (buffer-name)))))
(add-hook 'prog-mode-hook #'format-all-ensure-formatter)
(add-hook 'json-mode-hook #'(lambda ()
(setq-local format-all-formatters '(("JSON" prettierd)
("JSON5" prettierd)))))
(add-hook 'markdown-mode-hook #'(lambda ()
(setq-local format-all-formatters '(("Markdown" prettierd)))))
(add-hook 'lua-mode-hook #'(lambda ()
(setq-local format-all-formatters '(("Lua" stylua)))))
(add-hook 'web-mode-hook #'(lambda ()
(setq-local format-all-formatters '(("HTML" prettierd)
("CSS" prettierd)
("Less" prettierd)
("SCSS" prettierd)))))
(add-hook 'rjsx-mode-hook #'(lambda ()
(setq-local format-all-formatters '(("JSX" prettierd)
("Javascript" prettierd)
("Typescript" prettierd)
("TSX" prettierd)))))
(add-hook 'python-mode-hook #'(lambda ()
(setq-local format-all-formatters '(("Python" isort black))))))
vterm
(use-package vterm
:commands vterm
:custom
(vterm-shell "fish")
(vterm-max-scrollback 10000)
(vterm-set-bold-hightbright t)
(vterm-clear-scrollback-when-clearing t))
(use-package vterm-toggle
:bind (([C-f2] . vtern-toggle-cd)
([f2] . vterm-toggle)
:map vterm-mode-map
([f2] . vterm-toggle)))
eshell
(use-package eshell-toggle
:after eshell
:custom
(eshell-toggle-size-fraction 3)
(eshell-toggle-run-command nil)
:bind
("C-`" . eshell-toggle))
(dolist (mode '(org-mode-hook
term-mode-hook
shell-mode-hook
treemacs-mode-hook
vterm-mode-hook
eshell-mode-hook))
(add-hook mode #'(lambda () (display-line-numbers-mode 0))))
lsp-mode
(use-package lsp-mode
:commands (lsp lsp-deferred)
:hook (prog-mode . lsp-mode)
:init
;; (add-to-list 'exec-path (expand-file-name "~/.local/share/nvim/lsp_servers/haskell"))
(setq lsp-keymap-prefix "C-l"
lsp-completion-provider :none
lsp-clients-clangd-args "--header-insertion-decorators=0 --background-index -pch-storage=memory --clang-tidy --suggest-missing-includes --cross-file-rename --completion-style=detailed"
lsp-css-lint-box-model "warning"
lsp-css-lint-duplicate-properties "warning"
lsp-css-lint-empty-rules "error"
lsp-css-lint-float "error"
lsp-css-lint-zero-units "warning"
lsp-lua-completion-call-snippet "Both"
lsp-lua-hint-enable t
lsp-lua-workspace-max-preload 2000
lsp-lua-workspace-preload-file-size 1000
lsp-lua-diagnostics-disable ["lowercase-global"]
lsp-lua-diagnostics-globals ["describe"]
lsp-lua-runtime-unicode-name t
lsp-haskell-formatting-provider "fourmolu"
lsp-haskell-server-path "/Users/shubham_pawar1/.local/share/nvim/lsp_servers/haskell/haskell-language-server-8.10.7"
;; lsp-haskell-server-args '("-d" "-l" (concat (expand-file-name "~/.cache") "/hls.log"))
lsp-go-hover-kind "FullDocumentation"
)
;; (lsp-register-custom-settings
;; '(("gopls.completeUnimported" t t)
;; ("gopls.usePlaceholders" t t)
;; ("gopls.analyses.unreachable" t t)
;; ("gopls.staticcheck" t t)))
:custom
(lsp-disabled-clients '((python-mode . pyls)))
(lsp-eslint-run "onSave")
(lsp-eslint-auto-fix-on-save t)
:config
(lsp-enable-which-key-integration t)
(general-define-key
:states '(normal visual motion)
:keymaps 'lsp-mode-map
:prefix "g"
"d" '(lsp-find-definition :which-key "Goto defination")
"r" '(lsp-find-references :which-key "Find references")
"a" '(lsp-ui-sideline-apply-code-actions :which-key "Code actions")
"o" '(lsp-organize-imports :which-key "Organize Imports")
"I" '(lsp-javascript-rename-file :which-key "JS rename file")
"R" '(lsp-rename :which-key "Rename")))
general.el toggle section
(use-package yasnippet
:hook ((company-mode org-mode) . yas-minor-mode-on))
(use-package yasnippet-snippets
:after yasnippet)
(require 'm-langs)
from dotfiles.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotfiles.