Compare commits

..

No commits in common. "c9075e6d7201d936f1b388259372c45a3dd8d6b6" and "18e7b2b507a267e05297a51e47a89dd32f281238" have entirely different histories.

6 changed files with 102 additions and 151 deletions

View file

@ -73,8 +73,7 @@ keymap("x", "-", "/", opts)
keymap("n", "<leader>e", ":NvimTreeToggle<CR>", opts) keymap("n", "<leader>e", ":NvimTreeToggle<CR>", opts)
-- Telescope -- Telescope
keymap("n", "<leader>fa", ":Telescope find_files<CR>", opts) keymap("n", "<leader>ff", ":Telescope find_files<CR>", opts)
keymap("n", "<leader>ff", ":Telescope git_files<CR>", opts)
keymap("n", "<leader>ft", ":Telescope live_grep<CR>", opts) keymap("n", "<leader>ft", ":Telescope live_grep<CR>", opts)
keymap("n", "<leader>fp", ":Telescope projects<CR>", opts) keymap("n", "<leader>fp", ":Telescope projects<CR>", opts)
keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts) keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)

View file

@ -83,7 +83,7 @@ M.on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false client.server_capabilities.documentFormattingProvider = false
end end
if client.name == "lua_ls" then if client.name == "sumneko_lua" then
client.server_capabilities.documentFormattingProvider = false client.server_capabilities.documentFormattingProvider = false
end end

View file

@ -1,5 +1,5 @@
local servers = { local servers = {
"lua_ls", "sumneko_lua",
"cssls", "cssls",
"html", "html",
"tsserver", "tsserver",
@ -9,8 +9,6 @@ local servers = {
"yamlls", "yamlls",
"rust_analyzer", "rust_analyzer",
"gopls", "gopls",
"clangd",
"taplo"
} }
local settings = { local settings = {

View file

@ -30,7 +30,7 @@ vim.opt.showcmd = true -- hide (partial) command in the
vim.opt.ruler = false -- hide the line and column number of the cursor position vim.opt.ruler = false -- hide the line and column number of the cursor position
--vim.opt.numberwidth = 4 -- minimal number of columns to use for the line number {default 4} --vim.opt.numberwidth = 4 -- minimal number of columns to use for the line number {default 4}
vim.opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time vim.opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
vim.opt.wrap = true -- display lines as one long line vim.opt.wrap = false -- display lines as one long line
vim.opt.scrolloff = 8 -- minimal number of screen lines to keep above and below the cursor vim.opt.scrolloff = 8 -- minimal number of screen lines to keep above and below the cursor
vim.opt.sidescrolloff = 8 -- minimal number of screen columns to keep to the left and right of the cursor if wrap is `false` vim.opt.sidescrolloff = 8 -- minimal number of screen columns to keep to the left and right of the cursor if wrap is `false`
vim.opt.guifont = "monospace:h17" -- the font used in graphical neovim applications vim.opt.guifont = "monospace:h17" -- the font used in graphical neovim applications

View file

@ -1,27 +1,27 @@
local fn = vim.fn local fn = vim.fn
-- Automatically install packer -- Automatically install packer
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system({ PACKER_BOOTSTRAP = fn.system {
"git", "git",
"clone", "clone",
"--depth", "--depth",
"1", "1",
"https://github.com/wbthomason/packer.nvim", "https://github.com/wbthomason/packer.nvim",
install_path, install_path,
}) }
print("Installing packer close and reopen Neovim...") print "Installing packer close and reopen Neovim..."
vim.cmd([[packadd packer.nvim]]) vim.cmd [[packadd packer.nvim]]
end end
-- Autocommand that reloads neovim whenever you save the plugins.lua file -- Autocommand that reloads neovim whenever you save the plugins.lua file
vim.cmd([[ vim.cmd [[
augroup packer_user_config augroup packer_user_config
autocmd! autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end augroup end
]]) ]]
-- Use a protected call so we don't error out on first use -- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer") local status_ok, packer = pcall(require, "packer")
@ -30,97 +30,95 @@ if not status_ok then
end end
-- Have packer use a popup window -- Have packer use a popup window
packer.init({ packer.init {
display = { display = {
open_fn = function() open_fn = function()
return require("packer.util").float({ border = "rounded" }) return require("packer.util").float { border = "rounded" }
end, end,
}, },
git = { git = {
clone_timeout = 300, -- Timeout, in seconds, for git clones clone_timeout = 300, -- Timeout, in seconds, for git clones
}, },
}) }
-- Install your plugins here -- Install your plugins here
return packer.startup(function(use) return packer.startup(function(use)
-- My plugins here -- My plugins here
use({ "wbthomason/packer.nvim", commit = "6afb67460283f0e990d35d229fd38fdc04063e0a" }) -- Have packer manage itself use { "wbthomason/packer.nvim", commit = "6afb67460283f0e990d35d229fd38fdc04063e0a" } -- Have packer manage itself
use({ "nvim-lua/plenary.nvim", commit = "4b7e52044bbb84242158d977a50c4cbcd85070c7" }) -- Useful lua functions used by lots of plugins use { "nvim-lua/plenary.nvim", commit = "4b7e52044bbb84242158d977a50c4cbcd85070c7" } -- Useful lua functions used by lots of plugins
--use { "windwp/nvim-autopairs", commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347" } -- Autopairs, integrates with both cmp and treesitter --use { "windwp/nvim-autopairs", commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347" } -- Autopairs, integrates with both cmp and treesitter
use({ "numToStr/Comment.nvim", commit = "97a188a98b5a3a6f9b1b850799ac078faa17ab67" }) use { "numToStr/Comment.nvim", commit = "97a188a98b5a3a6f9b1b850799ac078faa17ab67" }
use({ "JoosepAlviste/nvim-ts-context-commentstring", commit = "4d3a68c41a53add8804f471fcc49bb398fe8de08" }) use { "JoosepAlviste/nvim-ts-context-commentstring", commit = "4d3a68c41a53add8804f471fcc49bb398fe8de08" }
use({ "kyazdani42/nvim-web-devicons", commit = "563f3635c2d8a7be7933b9e547f7c178ba0d4352" }) use { "kyazdani42/nvim-web-devicons", commit = "563f3635c2d8a7be7933b9e547f7c178ba0d4352" }
use({ "kyazdani42/nvim-tree.lua", commit = "7282f7de8aedf861fe0162a559fc2b214383c51c" }) use { "kyazdani42/nvim-tree.lua", commit = "7282f7de8aedf861fe0162a559fc2b214383c51c" }
use({ "akinsho/bufferline.nvim", commit = "83bf4dc7bff642e145c8b4547aa596803a8b4dc4" }) use { "akinsho/bufferline.nvim", commit = "83bf4dc7bff642e145c8b4547aa596803a8b4dc4" }
use({ "moll/vim-bbye", commit = "25ef93ac5a87526111f43e5110675032dbcacf56" }) use { "moll/vim-bbye", commit = "25ef93ac5a87526111f43e5110675032dbcacf56" }
use({ "nvim-lualine/lualine.nvim", commit = "a52f078026b27694d2290e34efa61a6e4a690621" }) use { "nvim-lualine/lualine.nvim", commit = "a52f078026b27694d2290e34efa61a6e4a690621" }
use({ "akinsho/toggleterm.nvim", commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda" }) use { "akinsho/toggleterm.nvim", commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda" }
use({ "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6" }) use { "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6" }
use({ "lewis6991/impatient.nvim", commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6" }) use { "lewis6991/impatient.nvim", commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6" }
--use { "lukas-reineke/indent-blankline.nvim", commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6" } --use { "lukas-reineke/indent-blankline.nvim", commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6" }
use({ "goolord/alpha-nvim", commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31" }) use { "goolord/alpha-nvim", commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31" }
-- Colorschemes -- Colorschemes
use({ "folke/tokyonight.nvim", commit = "66bfc2e8f754869c7b651f3f47a2ee56ae557764" }) use { "folke/tokyonight.nvim", commit = "66bfc2e8f754869c7b651f3f47a2ee56ae557764" }
use({ "lunarvim/darkplus.nvim", commit = "13ef9daad28d3cf6c5e793acfc16ddbf456e1c83" }) use { "lunarvim/darkplus.nvim", commit = "13ef9daad28d3cf6c5e793acfc16ddbf456e1c83" }
use({ "catppuccin/nvim", as = "catppuccin" }) use { "catppuccin/nvim", as = "catppuccin" }
-- cmp plugins -- cmp plugins
use({ "hrsh7th/nvim-cmp", commit = "b0dff0ec4f2748626aae13f011d1a47071fe9abc" }) -- The completion plugin use { "hrsh7th/nvim-cmp", commit = "b0dff0ec4f2748626aae13f011d1a47071fe9abc" } -- The completion plugin
use({ "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" }) -- buffer completions use { "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" } -- buffer completions
use({ "hrsh7th/cmp-path", commit = "447c87cdd6e6d6a1d2488b1d43108bfa217f56e1" }) -- path completions use { "hrsh7th/cmp-path", commit = "447c87cdd6e6d6a1d2488b1d43108bfa217f56e1" } -- path completions
use({ "saadparwaiz1/cmp_luasnip", commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36" }) -- snippet completions use { "saadparwaiz1/cmp_luasnip", commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36" } -- snippet completions
use({ "hrsh7th/cmp-nvim-lsp", commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8" }) use { "hrsh7th/cmp-nvim-lsp", commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8" }
use({ "hrsh7th/cmp-nvim-lua", commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21" }) use { "hrsh7th/cmp-nvim-lua", commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21" }
-- snippets -- snippets
use({ "L3MON4D3/LuaSnip", commit = "8f8d493e7836f2697df878ef9c128337cbf2bb84" }) --snippet engine use { "L3MON4D3/LuaSnip", commit = "8f8d493e7836f2697df878ef9c128337cbf2bb84" } --snippet engine
use({ "rafamadriz/friendly-snippets", commit = "2be79d8a9b03d4175ba6b3d14b082680de1b31b1" }) -- a bunch of snippets to use use { "rafamadriz/friendly-snippets", commit = "2be79d8a9b03d4175ba6b3d14b082680de1b31b1" } -- a bunch of snippets to use
-- LSP -- LSP
-- use { "williamboman/nvim-lsp-installer", commit = "e9f13d7acaa60aff91c58b923002228668c8c9e6" } -- simple to use language server installer -- use { "williamboman/nvim-lsp-installer", commit = "e9f13d7acaa60aff91c58b923002228668c8c9e6" } -- simple to use language server installer
use({ "neovim/nvim-lspconfig" }) -- enable LSP use { "neovim/nvim-lspconfig", commit = "f11fdff7e8b5b415e5ef1837bdcdd37ea6764dda" } -- enable LSP
use({ "williamboman/mason.nvim" }) use { "williamboman/mason.nvim", commit = "c2002d7a6b5a72ba02388548cfaf420b864fbc12"}
use({ "williamboman/mason-lspconfig.nvim" }) use { "williamboman/mason-lspconfig.nvim", commit = "0051870dd728f4988110a1b2d47f4a4510213e31" }
use({ "jose-elias-alvarez/null-ls.nvim" }) -- for formatters and linters use { "jose-elias-alvarez/null-ls.nvim", commit = "c0c19f32b614b3921e17886c541c13a72748d450" } -- for formatters and linters
use({ "RRethy/vim-illuminate" }) use { "RRethy/vim-illuminate", commit = "a2e8476af3f3e993bb0d6477438aad3096512e42" }
-- Telescope -- Telescope
use({ "nvim-telescope/telescope.nvim", commit = "76ea9a898d3307244dce3573392dcf2cc38f340f" }) use { "nvim-telescope/telescope.nvim", commit = "76ea9a898d3307244dce3573392dcf2cc38f340f" }
-- Treesitter -- Treesitter
use({ use {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
commit = "1942f3554184e9d9dfb90dcc6542047b8f6511f2", commit = "1942f3554184e9d9dfb90dcc6542047b8f6511f2",
}) }
use({ use {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",
commit = "0dd5eae6dbf226107da2c2041ffbb695d9e267c1", commit = "0dd5eae6dbf226107da2c2041ffbb695d9e267c1",
}) }
-- Git -- Git
use({ "lewis6991/gitsigns.nvim", commit = "f98c85e7c3d65a51f45863a34feb4849c82f240f" }) use { "lewis6991/gitsigns.nvim", commit = "f98c85e7c3d65a51f45863a34feb4849c82f240f" }
-- DAP -- DAP
use({ "mfussenegger/nvim-dap" }) use { "mfussenegger/nvim-dap", commit = "014ebd53612cfd42ac8c131e6cec7c194572f21d" }
use({ "rcarriga/nvim-dap-ui" }) use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
use({ "ravenxrz/DAPInstall.nvim" }) use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
use({ "MunifTanjim/exrc.nvim" }) use { "MunifTanjim/exrc.nvim" }
-- use { "simrat39/rust-tools.nvim" } -- use { "simrat39/rust-tools.nvim" }
-- use { "mfussenegger/nvim-dap-python" } -- use { "mfussenegger/nvim-dap-python" }
use({ "jayp0521/mason-nvim-dap.nvim" }) use { "jayp0521/mason-nvim-dap.nvim" }
use("farmergreg/vim-lastplace") use 'farmergreg/vim-lastplace'
use("fedepujol/move.nvim") use 'fedepujol/move.nvim'
use({ "j-hui/fidget.nvim", commit = "2cf9997d3bde2323a1a0934826ec553423005a26" }) use { "j-hui/fidget.nvim", commit = "2cf9997d3bde2323a1a0934826ec553423005a26" }
use({ "mg979/vim-visual-multi" }) use { "mg979/vim-visual-multi" }
use({ "vala-lang/vala.vim" }) use { 'vala-lang/vala.vim' }
use({ "folke/which-key.nvim" }) use { 'folke/which-key.nvim' }
use({ "mbbill/undotree" })
-- Automatically set up your configuration after cloning packer.nvim -- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins -- Put this at the end after all plugins

View file

@ -3,15 +3,6 @@ if not status_ok then
return return
end end
vim.api.nvim_create_autocmd("BufEnter", {
callback = function()
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()))
if ok and stats and stats.size > 1024 * 1024 then
-- require("nvim-treesitter.configs").setup({highlight = { enable = false }})
end
end,
})
vim.cmd("set foldmethod=expr") vim.cmd("set foldmethod=expr")
vim.cmd("set foldexpr=nvim_treesitter#foldexpr()") vim.cmd("set foldexpr=nvim_treesitter#foldexpr()")
vim.cmd("set nofoldenable") vim.cmd("set nofoldenable")
@ -30,43 +21,7 @@ configs.setup({
highlight = { highlight = {
enable = true, -- false will disable the whole extension enable = true, -- false will disable the whole extension
-- disable = { "css", "help" }, disable = { "css", "help" }, -- list of language that will be disabled
disable = function(lang, buf)
if vim.tbl_contains({ "help", "latex" }, lang) then
return true
end
local max_filesize = 1024 * 1024
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
-- if vim.builtin.illuminate.active then
-- pcall(require("illuminate").pause_buf)
-- end
vim.schedule(function()
vim.api.nvim_buf_call(buf, function()
vim.cmd("setlocal noswapfile noundofile")
if vim.tbl_contains({ "json" }, lang) then
vim.cmd("NoMatchParen")
vim.cmd("syntax off")
vim.cmd("syntax clear")
vim.cmd("setlocal nocursorline nolist bufhidden=unload")
vim.api.nvim_create_autocmd({ "BufDelete" }, {
callback = function()
vim.cmd("DoMatchParen")
vim.cmd("syntax on")
end,
buffer = buf,
})
end
end)
end)
return true
end
end,
}, },
autopairs = { autopairs = {
enable = true, enable = true,
@ -86,3 +41,4 @@ if not status_ok then
end end
context.setup({}) context.setup({})