Update editor configs

master
Ian Mancini 3 years ago
parent d4c2ed404c
commit 89ef9a303c

@ -19,13 +19,13 @@
;; ;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd ;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two: ;; font string. You generally only need these two:
(setq doom-font (font-spec :family "{{typography.mono.font}}" :size {{typography.mono.size}})) (setq doom-font (font-spec :family "Iosevka Nerd Font" :size 14))
;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) ;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;; There are two ways to load a theme. Both assume the theme is installed and ;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the ;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default: ;; `load-theme' function. This is the default:
(setq doom-theme '{{colors.emacs_colorscheme}}) (setq doom-theme 'doom-one)
(setq doom-themes-treemacs-theme "doom-colors") (setq doom-themes-treemacs-theme "doom-colors")
;; If you use `org' and don't want your org files in the default location below, ;; If you use `org' and don't want your org files in the default location below,
@ -83,6 +83,8 @@
(directory-files-recursively (directory-files-recursively
directory org-agenda-file-regexp)) directory org-agenda-file-regexp))
'("~/.org/work/" "~/.org/projects/" "~/.org/learning/" "~/.org/calendars" "~/.org/conferences/")))) '("~/.org/work/" "~/.org/projects/" "~/.org/learning/" "~/.org/calendars" "~/.org/conferences/"))))
(setq org-roam-directory (file-truename "~/.org/roam"))
(org-roam-db-autosync-mode)
) )
(use-package! org-fancy-priorities (use-package! org-fancy-priorities
@ -98,36 +100,30 @@
:config :config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
(use-package! org-ref ; (use-package! org-ref
:after org ; :after org
:config ; :config
(setq bibtex-completion-pdf-field 'file) ; (setq bibtex-completion-pdf-field 'file)
(defun my/org-ref-open-pdf-at-point () ; (defun my/org-ref-open-pdf-at-point ()
"Open the pdf for bibtex key under point if it exists." ; "Open the pdf for bibtex key under point if it exists."
(interactive) ; (interactive)
(let* ((results (org-ref-get-bibtex-key-and-file)) ; (let* ((results (org-ref-get-bibtex-key-and-file))
(key (car results)) ; (key (car results))
(pdf-file (car (bibtex-completion-find-pdf key)))) ; (pdf-file (car (bibtex-completion-find-pdf key))))
(if (file-exists-p pdf-file) ; (if (file-exists-p pdf-file)
(find-file pdf-file) ; original in org-ref-help, ; (find-file pdf-file) ; original in org-ref-help,
; opens external viewer (org-open-file pdf-file) ; ; opens external viewer (org-open-file pdf-file)
(message "No PDF found for %s" key)))) ; (message "No PDF found for %s" key))))
(setq org-ref-open-pdf-function 'find-file) ; (setq org-ref-open-pdf-function 'find-file)
;
(setq bibtex-file "~/.org/biblio.bib" ; (setq bibtex-file "~/.org/biblio.bib"
bibtex-completion-bibliography bibtex-file ; bibtex-completion-bibliography bibtex-file
reftex-default-bibliography bibtex-file ; reftex-default-bibliography bibtex-file
org-ref-default-bibliography (list bibtex-file) ; org-ref-default-bibliography (list bibtex-file)
org-ref-completion-library 'org-ref-ivy-cite ; org-ref-completion-library 'org-ref-ivy-cite
org-ref-bibliography-notes "~/.org/biblio-notes.org" ; org-ref-bibliography-notes "~/.org/biblio-notes.org"
org-ref-pdf-directory "~/.org/biblio-pdfs/") ; org-ref-pdf-directory "~/.org/biblio-pdfs/")
) ; )
(use-package! org-roam
:after org
:config
(setq org-roam-db-location "/home/ianmethyst/.local/share/emacs/org-roam.db"))
(setq deft-directory "~/.org" (setq deft-directory "~/.org"
deft-recursive t) deft-recursive t)
@ -138,7 +134,7 @@
(setq-default delete-by-moving-to-trash t) ; Delete files to trash (setq-default delete-by-moving-to-trash t) ; Delete files to trash
(defvar holiday-custom-holidays nil (defvar holiday-custom-holidays nil
"Custom holidays") "Custom holidays.")
(setq holiday-custom-holidays (setq holiday-custom-holidays
'((holiday-fixed 1 1 "Año nuevo") '((holiday-fixed 1 1 "Año nuevo")
@ -192,3 +188,5 @@
'org-caldav-sync 'org-caldav-sync
:after :after
#'fix-birthdays-timestamps)) #'fix-birthdays-timestamps))
(setq +format-with-lsp nil)

@ -23,18 +23,19 @@
(company +childframe) ; the ultimate code completion backend (company +childframe) ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life ;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine... ;;ido ; the other *other* search engine...
(ivy +fuzzy +prescient) ; a search engine for love and life ;;(ivy +fuzzy +prescient) ; a search engine for love and life
(vertico +icons)
:ui :ui
deft ; notational velocity for Emacs deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂 (emoji +unicode) ; 🙂
fill-column ; a `fill-column' indicator fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
;;indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side ;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
@ -55,9 +56,9 @@
(evil +everywhere); come to the dark side, we have cookies (evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness (format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys ;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim ;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once ;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent ;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of ;;parinfer ; turn lisp into python, sort of
@ -93,7 +94,7 @@
(eval +overlay) ; run code, run (also, repls) (eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists ;;gist ; interacting with github gists
lookup ; navigate your code and its documentation lookup ; navigate your code and its documentation
;;lsp lsp
magit ; a git porcelain for Emacs magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs ;;make ; run make tasks from Emacs
pass ; password manager for nerds pass ; password manager for nerds
@ -118,7 +119,7 @@
;;coq ; proofs-as-programs ;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans ;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats data ; config/data formats
;;(dart +flutter) ; paint ui and not much else ;;(dart +flutter) ; paint ui and not much else
;;elixir ; erlang done right ;;elixir ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
@ -136,22 +137,22 @@
;;idris ; a language you can depend on ;;idris ; a language you can depend on
;;json ; At least it ain't XML ;;json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome ;;(java +meghanada) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here)))))) (javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB ;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun ;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove ;;lean ; for folks with too much to prove
;;ledger ; be audit you can be ;;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 markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c ;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!" ;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel ;;ocaml ; an objective camel
(org +dragndrop +roam) ; organize your plain life in plain text (org +dragndrop +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother (php +lsp) ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more ;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional ;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly (python +lsp +pyright +poetry +pyenv) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever ;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs ;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6 ;;raku ; the artist formerly known as perl6
@ -161,13 +162,13 @@
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good ;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps ;;(scheme +guile) ; a fully conniving family of lisps
;;sh ; she sells {ba,z,fi}sh shells on the C xor sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml ;;sml
;;solidity ; do you need a blockchain? No. ;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables? ;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance. ;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes web ; the tubes
;;yaml ; JSON, but readable yaml ; JSON, but readable
;;zig ; C, but simpler ;;zig ; C, but simpler
:email :email

@ -56,7 +56,6 @@
(package! org-fancy-priorities) (package! org-fancy-priorities)
(package! org-ref) (package! org-ref)
(package! org-caldav) (package! org-caldav)
(package! org-roam-server)
(package! nyan-mode) (package! nyan-mode)

@ -5,7 +5,7 @@ command -v vim >/dev/null && alias vi="vi" vim="vim" vimdiff="vimdiff"
command -v nvim >/dev/null && alias vi="nvim" vim="nvim" vimdiff="nvim -d" command -v nvim >/dev/null && alias vi="nvim" vim="nvim" vimdiff="nvim -d"
# neovim-remote # neovim-remote
nvr_command="nvr -cc split --remote-wait +'set bufhidden=wipe'" nvr_command="nvr --remote-wait +'set bufhidden=wipe'"
command -v nvr >/dev/null && alias vi="$nvr_command" vim="$nvr_command" command -v nvr >/dev/null && alias vi="$nvr_command" vim="$nvr_command"
# Verbose # Verbose

@ -1,7 +1,10 @@
local prettier = function() local prettier = function()
return { return {
exe = "prettier", exe = "prettier",
args = {"--stdin-filepath", vim.api.nvim_buf_get_name(0), '--single-quote', '--no-semi'}, args = {
"--stdin-filepath", vim.api.nvim_buf_get_name(0), '--single-quote',
'--no-semi'
},
stdin = true stdin = true
} }
end end
@ -14,20 +17,59 @@ local black = function()
} }
end end
local clang_format = function()
return {
exe = "clang-format",
args = {"--assume-filename", vim.api.nvim_buf_get_name(0)},
stdin = true,
cwd = vim.fn.expand('%:p:h')
}
end
local gofmt = function()
return {
exe = "gofmt",
stdin = true
}
end
local blade_formatter = function()
return {
exe = "blade-formatter",
args = {"--stdin"},
stdin = true
}
end
local lua_formatter = function()
return {
exe = "lua-format",
stdin = true
}
end
require('formatter').setup({ require('formatter').setup({
logging = false, logging = false,
filetype = { filetype = {
c = {clang_format},
blade = {blade_formatter},
go = {gofmt},
cpp = {clang_format},
javascript = {prettier}, javascript = {prettier},
javascriptreact = {prettier}, javascriptreact = {prettier},
typescript = {prettier}, typescript = {prettier},
typescriptreact = {prettier}, typescriptreact = {prettier},
python = {black} php = {prettier},
css = {prettier},
html = {prettier},
python = {black},
lua = {lua_formatter}
} }
}) })
vim.api.nvim_exec([[ vim.api.nvim_exec([[
augroup FormatAutogroup augroup FormatAutogroup
autocmd! autocmd!
autocmd BufWritePost *.js,*.ts,*.jsx,*.tsx,*.py FormatWrite autocmd BufWritePost *.c,*.h,*.cpp,*.go,*.html,*.css,*.js,*.ts,*.jsx,*.tsx,*.py,*.blade.php,*.php,*.lua FormatWrite
augroup END augroup END
]], true) ]], true)

@ -1,22 +1,22 @@
---@diagnostic disable: undefined-global ---@diagnostic disable: undefined-global
return require('packer').startup(function() return require('packer').startup(function()
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
use {'ibhagwan/fzf-lua', -- Fuzzy finder
use {
'ibhagwan/fzf-lua',
requires = { requires = {
'vijaymarupudi/nvim-fzf', 'vijaymarupudi/nvim-fzf', 'kyazdani42/nvim-web-devicons' -- optional for icons
'kyazdani42/nvim-web-devicons' -- optional for icons
}, },
config = [[require('plugins.fzf-lua')]] config = [[require('plugins.fzf-lua')]]
} }
-- File explorer
use { use {
'kevinhwang91/rnvimr', 'kevinhwang91/rnvimr',
config = [[require('plugins.rnvimr')]] config = [[require('plugins.rnvimr')]]
} }
-- File explorer
use { use {
'kyazdani42/nvim-tree.lua', 'kyazdani42/nvim-tree.lua',
config = [[require('plugins.nvim-tree')]] config = [[require('plugins.nvim-tree')]]
@ -29,19 +29,21 @@ return require('packer').startup(function()
} }
-- Langugage specific LSP plugins -- Langugage specific LSP plugins
use { 'tjdevries/nlua.nvim' } use {'tjdevries/nlua.nvim'}
use {'jose-elias-alvarez/nvim-lsp-ts-utils'}
-- Additional LSP plugins -- Additional LSP plugins
use { use {
'glepnir/lspsaga.nvim', 'tami5/lspsaga.nvim',
commit = '373bc031b39730cbfe492533c3acfac36007899a',
config = [[require('plugins.lspsaga-nvim')]] config = [[require('plugins.lspsaga-nvim')]]
} }
use { 'folke/lsp-colors.nvim' } use {'folke/lsp-colors.nvim'}
-- Outline (LSP) -- Outline (LSP)
-- use { 'simrat39/symbols-outline.nvim' } -- use { 'simrat39/symbols-outline.nvim' }
use { 'stevearc/aerial.nvim' } use {'stevearc/aerial.nvim'}
-- Diagnostics -- Diagnostics
use { use {
@ -73,8 +75,8 @@ return require('packer').startup(function()
} }
-- Snippets -- Snippets
use { 'hrsh7th/vim-vsnip' } use {'hrsh7th/vim-vsnip'}
use { 'hrsh7th/vim-vsnip-integ' } use {'hrsh7th/vim-vsnip-integ'}
-- Terminal -- Terminal
use { use {
@ -85,10 +87,10 @@ return require('packer').startup(function()
-- Git -- Git
use { use {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
requires = { 'nvim-lua/plenary.nvim' }, requires = {'nvim-lua/plenary.nvim'},
config = [[require('plugins.gitsigns-nvim')]] config = [[require('plugins.gitsigns-nvim')]]
} }
use { 'tpope/vim-fugitive' } use {'tpope/vim-fugitive'}
use { use {
'kdheepak/lazygit.nvim', 'kdheepak/lazygit.nvim',
config = [[require('plugins.lazygit-nvim')]] config = [[require('plugins.lazygit-nvim')]]
@ -101,9 +103,12 @@ return require('packer').startup(function()
} }
-- Handy stuff -- Handy stuff
use { 'ygm2/rooter.nvim' } use {
use { 'dhruvasagar/vim-table-mode' } 'ygm2/rooter.nvim',
use { 'tpope/vim-eunuch' } config = function() vim.g.outermost_root = false end
}
use {'dhruvasagar/vim-table-mode'}
use {'tpope/vim-eunuch'}
-- Statusline -- Statusline
-- use { -- use {
@ -113,25 +118,28 @@ return require('packer').startup(function()
use { use {
'hoob3rt/lualine.nvim', 'hoob3rt/lualine.nvim',
requires = {'kyazdani42/nvim-web-devicons', opt = true}, requires = {
'kyazdani42/nvim-web-devicons',
opt = true
},
config = [[require('plugins.lualine')]] config = [[require('plugins.lualine')]]
} }
-- Syntax plugins -- Syntax plugins
use { 'euclidianAce/BetterLua.vim' } use {'euclidianAce/BetterLua.vim'}
-- Color highlighting -- Color highlighting
use { 'norcalli/nvim-colorizer.lua' } use {'norcalli/nvim-colorizer.lua'}
-- Colorschemes -- Colorschemes
use { use {
'Th3Whit3Wolf/onebuddy', 'Th3Whit3Wolf/onebuddy',
requires = { {'tjdevries/colorbuddy.vim'} } requires = {'tjdevries/colorbuddy.vim'}
} }
use { 'RRethy/nvim-base16' } use {'RRethy/nvim-base16'}
use { 'NTBBloodbath/doom-one.nvim' } use {'NTBBloodbath/doom-one.nvim'}
use { 'folke/tokyonight.nvim' } use {'folke/tokyonight.nvim'}
use { 'marko-cerovac/material.nvim' } use {'marko-cerovac/material.nvim'}
-- Cursorline -- Cursorline
-- use { 'xiyaowong/nvim-cursorword' } -- use { 'xiyaowong/nvim-cursorword' }
@ -147,5 +155,7 @@ return require('packer').startup(function()
'petobens/poet-v', 'petobens/poet-v',
config = [[require('plugins.poet-v')]] config = [[require('plugins.poet-v')]]
} }
end)
-- Blade
use {'Eduruiz/vim-blade'}
end)

@ -1,16 +1,19 @@
local lsp = require("lspconfig") local lsp = require("lspconfig")
local aerial = require("aerial") local aerial = require("aerial")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( vim.lsp.handlers["textDocument/publishDiagnostics"] =
vim.lsp.diagnostic.on_publish_diagnostics, { vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
signs = true, signs = true,
virtual_text = true, virtual_text = true,
underline = true underline = true
}) })
local noremap = function(lhs, rhs, mode) local noremap = function(lhs, rhs, mode)
mode = mode or 'n' mode = mode or 'n'
local opts = { noremap=true, silent=true } local opts = {
noremap = true,
silent = true
}
vim.api.nvim_buf_set_keymap(0, mode, lhs, rhs, opts) vim.api.nvim_buf_set_keymap(0, mode, lhs, rhs, opts)
end end
@ -39,7 +42,7 @@ local set_lsp_config = function(client, bufnr)
[']e'] = '<cmd>Lspsaga diagnostic_jump_prev<CR>', [']e'] = '<cmd>Lspsaga diagnostic_jump_prev<CR>',
['<leader>co'] = '<cmd>AerialToggle!<CR>', ['<leader>co'] = '<cmd>AerialToggle!<CR>',
['[['] = '<cmd>AerialPrevUp<CR>', ['[['] = '<cmd>AerialPrevUp<CR>',
[']]'] = '<cmd>AerialNext<CR>', [']]'] = '<cmd>AerialNext<CR>'
} }
} }
@ -50,12 +53,26 @@ local set_lsp_config = function(client, bufnr)
end end
end end
-- Lua -- Lua
require('nlua.lsp.nvim').setup(lsp, { require('nlua.lsp.nvim').setup(lsp, {
on_attach = set_lsp_config, on_attach = set_lsp_config
}) })
-- C/C++
lsp.clangd.setup {
on_attach = set_lsp_config
}
-- Golang
lsp.gopls.setup {
on_attach = set_lsp_config
}
-- PHP
lsp.phpactor.setup {
on_attach = set_lsp_config
}
-- Typescript -- Typescript
lsp.tsserver.setup { lsp.tsserver.setup {
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
@ -65,48 +82,9 @@ lsp.tsserver.setup {
} }
-- Python -- Python
lsp.pyright.setup {
lsp.pyright.setup{
on_attach = set_lsp_config on_attach = set_lsp_config
} }
-- lsp.pyls.setup{
-- on_attach = set_lsp_config,
-- settings = {
-- pyls = {
-- plugins = {
-- jedi_completion = {enabled = false},
-- jedi_definition = {enabled = false},
-- yapf = {enabled = false},
-- rope_completion = {enabled = false},
-- pylint = {enabled = false},
-- pyflakes = {enabled = false},
-- pydocstyle = {enabled = false},
-- preload = {enabled = false},
-- mccabe = {enabled = false},
-- jedi_symbols = {enabled = false},
-- jedi_references = {enabled = false},
-- }}}}
-- EFM
-- local function eslint_config_exists()
-- local eslintrc = vim.fn.glob(".eslintrc*", 0, 1)
--
-- if not vim.tbl_isempty(eslintrc) then
-- return true
-- end
--
-- if vim.fn.filereadable("package.json") then
-- if vim.fn.json_decode(vim.fn.readfile("package.json"))["eslintConfig"] then
-- return true
-- end
-- end
--
-- return false
-- end
local eslint = { local eslint = {
lintCommand = "eslint_d -f unix --stdin --stdin-filename ${INPUT}", lintCommand = "eslint_d -f unix --stdin --stdin-filename ${INPUT}",
@ -125,31 +103,37 @@ local flake8 = {
local isort = { local isort = {
formatCommand = "isort --profile black -", formatCommand = "isort --profile black -",
formatStdin = true, formatStdin = true
}
local phpstan = {
lintCommand = "./vendor/bin/phpstan analyze --error-format raw --no-progress"
} }
lsp.efm.setup { lsp.efm.setup {
init_options = { init_options = {
hover = true,
documentSymbol = true,
codeAction = true,
completion = true,
documentFormatting = true documentFormatting = true
}, },
filetypes = {"javascript", "typescript", "javascriptreact", "typescriptreact", "python" }, filetypes = {
on_attach = function(client, bufnr) "javascript", "typescript", "javascriptreact", "typescriptreact",
set_lsp_config(client, bufnr) "python", "php", "blade"
end, },
root_dir = function() on_attach = function(client, bufnr) set_lsp_config(client, bufnr) end,
-- if not eslint_config_exists() then root_dir = function() return vim.fn.getcwd() end,
-- return nil
-- end
return vim.fn.getcwd()
end,
settings = { settings = {
rootMarkers = {".eslintrc", ".eslintrc.js", ".git/", "pyproject.toml" }, rootMarkers = {".eslintrc", ".eslintrc.js", ".git/", "pyproject.toml"},
languages = { languages = {
javascript = {eslint}, javascript = {eslint},
javascriptreact = {eslint}, javascriptreact = {eslint},
typescript = {eslint}, typescript = {eslint},
typescriptreact = {eslint}, typescriptreact = {eslint},
python = {flake8, isort} python = {flake8, isort},
php = {phpstan},
blade = {phpstan}
} }
} }
} }

@ -1,6 +1,4 @@
local utils = require('utils') require("toggleterm").setup {
require("toggleterm").setup{
open_mapping = [[<a-`>]], open_mapping = [[<a-`>]],
hide_numbers = true, hide_numbers = true,
shade_terminals = true, shade_terminals = true,
@ -10,12 +8,15 @@ require("toggleterm").setup{
close_on_exit = false, close_on_exit = false,
float_opts = { float_opts = {
winblend = 0, winblend = 0,
border = 'single', border = 'single'
} }
} }
function _G.set_terminal_keymaps() function _G.set_terminal_keymaps()
utils.map('t', '<esc>', [[<C-\><C-n>]]) local opts = {
noremap = true
}
vim.api.nvim_buf_set_keymap(0, 't', '<esc>', [[<C-\><C-n>]], opts)
end end
vim.cmd('autocmd! TermOpen term://*toggleterm#* lua set_terminal_keymaps()') vim.cmd('autocmd! TermOpen term://(*toggleterm#* lua set_terminal_keymaps()')

@ -3,15 +3,13 @@ utils.map('n', '<leader>op', '<cmd>NvimTreeToggle<CR>')
vim.g.nvim_tree_special_files = {} vim.g.nvim_tree_special_files = {}
vim.g.nvim_tree_git_hl = 1 vim.g.nvim_tree_git_hl = 1
vim.g.nvim_tree_follow = 1
vim.g.nvim_tree_show_icons = { vim.g.nvim_tree_show_icons = {
git = 0, git = 0,
folders = 1, folders = 1,
files = 1, files = 1,
folder_arrows = 1, folder_arrows = 1
} }
vim.g.nvim_tree_icons = { vim.g.nvim_tree_icons = {
default = '', default = '',
git = { git = {
@ -22,12 +20,43 @@ vim.g.nvim_tree_icons = {
untracked = '', untracked = '',
deleted = '', deleted = '',
ignored = "" ignored = ""
}
}
require'nvim-tree'.setup {
disable_netrw = true,
hijack_netrw = true,
open_on_setup = false,
ignore_ft_on_setup = {},
update_to_buf_dir = {
enable = true,
auto_open = true
},
auto_close = false,
open_on_tab = false,
hijack_cursor = false,
update_cwd = false,
update_focused_file = {
enable = false,
update_cwd = false,
ignore_list = {}
},
system_open = {
cmd = nil,
args = {}
}, },
view = {
width = 30,
height = 30,
side = 'left',
auto_resize = false,
mappings = {
custom_only = false,
list = {}
}
}
} }
vim.api.nvim_exec( vim.api.nvim_exec([[
[[ au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif
au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif ]], false)
]],
false
)

@ -1,2 +1,2 @@
vim.g.highlight_whitespace = 0 vim.g.highlight_whitespace = 0
vim.g.strip_whitespace_on_save = 1 vim.g.strip_whitespace_on_save = 0

@ -22,7 +22,7 @@ done
if [ -d "$HOME/.dotfiles" ]; then if [ -d "$HOME/.dotfiles" ]; then
cd "$HOME/.dotfiles" cd "$HOME/.dotfiles"
for dir in $(find . -maxdepth 1 -type d -printf "%f\n" | grep -v '\.'); do for dir in $(find . -maxdepth 1 -type d -printf "%f\n" | grep -v '\.'); do
stow -D -d "$HOME/.dotfiles" -t "$HOME" "$dir" &> /dev/null stow -D -d "$HOME/.dotfiles" -t "$HOME" "$dir" &> /dev/null || true
done done
cd $OLDIR cd $OLDIR

Loading…
Cancel
Save