fix: add old misc updates to nvim
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
bf65c17f4b
commit
69703d3e57
4 changed files with 102 additions and 11 deletions
|
@ -5,3 +5,6 @@ autopairs.remove_rule("(")
|
|||
autopairs.remove_rule("[")
|
||||
autopairs.remove_rule("{")
|
||||
autopairs.remove_rule("<")
|
||||
|
||||
vim.o["lisp"] = true
|
||||
vim.o["autoindent"] = true
|
||||
|
|
|
@ -27,8 +27,9 @@ cmp.setup({
|
|||
),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'ultisnips' }, -- For ultisnips users.
|
||||
{ name = 'nvim_lsp', priority = 1000 },
|
||||
{ name = 'ultisnips', priority = 750 }, -- For ultisnips users.
|
||||
{ name = 'path', priority = 500 },
|
||||
}, {
|
||||
})
|
||||
})
|
||||
|
@ -124,6 +125,7 @@ lspconfig.rust_analyzer.setup {
|
|||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
|
||||
}
|
||||
|
||||
lspconfig.java_language_server.setup {
|
||||
|
@ -177,3 +179,9 @@ lspconfig.texlab.setup {
|
|||
on_attach=on_attach,
|
||||
capabilities=capabilities
|
||||
}
|
||||
|
||||
lspconfig.hls.setup {
|
||||
on_attach=on_attach,
|
||||
capabilities=capabilities,
|
||||
filetypes = { "haskell", "lhaskell", "cabal" }
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ map("n", "<C-z>", ":lua require('leap').leap { backward = true }<CR>")
|
|||
|
||||
-- pollen
|
||||
map("i", "<A-d>", "◊")
|
||||
map("i", "<A-l>", "λ")
|
||||
|
||||
-- colorscheme toggle
|
||||
-- map("n", "<A-j>", ":let ayucolor=\"dark\"<CR>:colorscheme ayu<CR>")
|
||||
|
@ -67,3 +68,6 @@ map("n", "<leader>od", ":TroubleToggle<CR>")
|
|||
-- workspaces
|
||||
map("n", "<leader>pp", ":Telescope workspaces theme=dropdown<CR>")
|
||||
map("n", "<leader>pa", ":WorkspacesAdd ")
|
||||
|
||||
-- relative line numbers
|
||||
map("n", "<C-f>", ":set relativenumber!<CR>")
|
||||
|
|
|
@ -34,6 +34,8 @@ packer.startup(function()
|
|||
use("lcheylus/overlength.nvim")
|
||||
use("akinsho/bufferline.nvim")
|
||||
use("folke/trouble.nvim")
|
||||
use("m4xshen/smartcolumn.nvim")
|
||||
-- use("goolord/alpha-nvim")
|
||||
|
||||
-- completion
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
|
@ -46,6 +48,10 @@ packer.startup(function()
|
|||
use("SirVer/ultisnips")
|
||||
use("quangnguyen30192/cmp-nvim-ultisnips")
|
||||
|
||||
-- sessions
|
||||
use("rmagatti/auto-session")
|
||||
use("rmagatti/session-lens")
|
||||
|
||||
-- misc
|
||||
use("davidgranstrom/nvim-markdown-preview")
|
||||
use("folke/todo-comments.nvim")
|
||||
|
@ -58,6 +64,7 @@ packer.startup(function()
|
|||
use{"kylechui/nvim-surround",branch="main"}
|
||||
use("numToStr/Comment.nvim")
|
||||
use("natecraddock/workspaces.nvim")
|
||||
use("Twinside/vim-hoogle")
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
|
@ -143,7 +150,7 @@ require('nvim-tree').setup {
|
|||
ignore = true,
|
||||
timeout = 1500,
|
||||
},
|
||||
sync_root_with_cwd = true
|
||||
sync_root_with_cwd = true,
|
||||
}
|
||||
|
||||
-- lualine
|
||||
|
@ -155,7 +162,8 @@ require('lualine').setup {
|
|||
|
||||
-- toggleterm
|
||||
require('toggleterm').setup {
|
||||
open_mapping = nil
|
||||
open_mapping = nil,
|
||||
start_in_insert = false,
|
||||
}
|
||||
|
||||
-- markdown preview
|
||||
|
@ -170,6 +178,8 @@ require('todo-comments').setup {}
|
|||
vim.g.copilot_filetypes = {
|
||||
['*'] = false,
|
||||
['java'] = true,
|
||||
['ocaml'] = true,
|
||||
-- ['tex'] = true,
|
||||
}
|
||||
|
||||
-- symbols-outline
|
||||
|
@ -209,21 +219,21 @@ require('formatter').setup {
|
|||
javascript = {
|
||||
require('formatter.filetypes.javascript').prettier
|
||||
},
|
||||
astro = {
|
||||
require('formatter.filetypes.javascript').prettier
|
||||
},
|
||||
tex = {
|
||||
require('formatter.filetypes.latex').latexindent
|
||||
},
|
||||
java = {
|
||||
function ()
|
||||
return {
|
||||
exe = "google-java-format",
|
||||
exe = "clang-format",
|
||||
args = {
|
||||
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
|
||||
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
|
||||
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
|
||||
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
|
||||
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
|
||||
"--style=Google",
|
||||
"--assume-filename=.java"
|
||||
},
|
||||
stdin = false
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
|
@ -254,4 +264,70 @@ vim.diagnostic.config({
|
|||
virtual_text = false,
|
||||
})
|
||||
|
||||
-- workspaces
|
||||
require("workspaces").setup {}
|
||||
|
||||
-- smartcolumn
|
||||
require("smartcolumn").setup {
|
||||
colorcolumn = 0,
|
||||
disabled_filetypes = { "help", "Telescope", "TelescopePrompt" }
|
||||
}
|
||||
|
||||
-- alpha
|
||||
-- local dashboard = require'alpha.themes.dashboard'
|
||||
-- dashboard.section.header.val = {
|
||||
-- [[ &&&&& ]],
|
||||
-- [[ & & &&&&& & ]],
|
||||
-- [[ & &&&&&/& ]],
|
||||
-- [[ && &&&&& ]],
|
||||
-- [[ & &&&& ]],
|
||||
-- [[ &&&&& &&&&&& ]],
|
||||
-- [[ & & &&/|| ]],
|
||||
-- [[ & & &&& &&//~ & && ]],
|
||||
-- [[ & &&&&\__&_/ //~~& &&&&&& & ]],
|
||||
-- [[ &&&&& /|\\_/&&&&& & ]],
|
||||
-- [[ & && &&\_\&\/& & &_&&&&&& && ]],
|
||||
-- [[ & &&&&&&&/&&& \&&&&&& &&& &&]],
|
||||
-- [[ && &/ &&&&& & & ]],
|
||||
-- [[ &/&& /~~ ]],
|
||||
-- [[ /~| ]],
|
||||
-- [[ \ ]],
|
||||
-- [[ /| ]],
|
||||
-- [[ /| ]],
|
||||
-- [[ \ ]],
|
||||
-- [[ / ]],
|
||||
-- [[ ╓───────────╭╱⎨⏆╲╮───────────╖ ]],
|
||||
-- [[ ║ ║ ]],
|
||||
-- [[ ╟────────────────────────────╢ ]],
|
||||
-- [[ ╟────────────────────────────╢ ]],
|
||||
-- [[ ╚════════════════════════════╝ ]],
|
||||
-- [[ ]],
|
||||
-- [[ [ https://priime.dev ] ]],
|
||||
-- }
|
||||
-- dashboard.section.buttons.val = {
|
||||
-- dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
|
||||
-- dashboard.button("SPC p p", " Open projects"),
|
||||
-- dashboard.button("SPC t f", " Find files"),
|
||||
-- dashboard.button("SPC t g", " Grep text"),
|
||||
-- dashboard.button("q", " Quit NVIM", ":qa<CR>"),
|
||||
-- }
|
||||
-- dashboard.config.opts.noautocmd = true
|
||||
-- dashboard.config.opts.redraw_on_resize = false
|
||||
|
||||
-- require("alpha").setup(dashboard.config)
|
||||
|
||||
-- sessions
|
||||
require("auto-session").setup {
|
||||
log_level = "error",
|
||||
cwd_change_handling = {
|
||||
restore_upcoming_session = true,
|
||||
post_cwd_changed_hook = function()
|
||||
require("lualine").refresh()
|
||||
vim.cmd([[filetype detect]])
|
||||
end,
|
||||
},
|
||||
auto_session_suppress_dirs = { "~/", "/" }
|
||||
}
|
||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
|
||||
require("session-lens").setup {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue