aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/nvim/init.lua61
-rw-r--r--configs/nvim/lazy-lock.json11
-rw-r--r--configs/nvim/lua/plugins.lua5
-rw-r--r--configs/nvim/lua/plugins/nvim-autopairs.lua6
-rw-r--r--configs/nvim/lua/plugins/nvim-tree.lua6
-rw-r--r--configs/nvim/lua/plugins/nvim-web-devicons.lua3
-rw-r--r--configs/nvim/lua/plugins/telescope.lua3
-rw-r--r--configs/nvim/lua/plugins/toggleterm-nvim.lua3
-rw-r--r--configs/nvim/lua/plugins/tokyonight-nvim.lua6
-rw-r--r--configs/nvim/lua/plugins/trouble-nvim.lua2
-rw-r--r--configs/nvim/lua/plugins/which-key-nvim.lua9
11 files changed, 59 insertions, 56 deletions
diff --git a/configs/nvim/init.lua b/configs/nvim/init.lua
index 8781791..a7178f6 100644
--- a/configs/nvim/init.lua
+++ b/configs/nvim/init.lua
@@ -2,7 +2,13 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-vim.opt.shell = "pwsh";
+vim.cmd([[
+ let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
+ let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
+ let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
+ let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
+ set shellquote= shellxquote=
+]])
vim.opt.termguicolors = true;
vim.opt.fileformats = "unix,dos";
@@ -11,6 +17,7 @@ vim.opt.shiftwidth = 4;
vim.opt.expandtab = true;
vim.opt.wrap = false;
vim.opt.number = true;
+vim.keymap.set('t', '<esc>', [[<C-\><C-n>]])
if vim.g.neovide then
vim.opt.guifont = "FiraCodeNerdFont";
@@ -59,6 +66,9 @@ require("bufferline").setup {
-- setup gitsigns
require('gitsigns').setup()
+-- setup toggleterm
+require("toggleterm").setup()
+
-- setup nvim-cmp
local cmp = require("cmp")
@@ -95,40 +105,29 @@ lspconfig.clangd.setup {
}
-- setup lsp lua
-require 'lspconfig'.lua_ls.setup {
- on_init = function(client)
- local path = client.workspace_folders[1].name
- if not vim.loop.fs_stat(path .. '/.luarc.json') and not vim.loop.fs_stat(path .. '/.luarc.jsonc') then
- client.config.settings = vim.tbl_deep_extend('force', client.config.settings, {
- Lua = {
- runtime = {
- -- Tell the language server which version of Lua you're using
- -- (most likely LuaJIT in the case of Neovim)
- version = 'LuaJIT'
- },
- -- Make the server aware of Neovim runtime files
- workspace = {
- checkThirdParty = false,
- library = {
- vim.env.VIMRUNTIME
- -- "${3rd}/luv/library"
- -- "${3rd}/busted/library",
- }
- -- or pull in all of 'runtimepath'. NOTE: this is a lot slower
- -- library = vim.api.nvim_get_runtime_file("", true)
- }
- }
- })
-
- client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
- end
- return true
- end
+require("lspconfig").lua_ls.setup {
+ capabilities = capabilities,
+ settings = {
+ Lua = {
+ diagnostics = {
+ globals = { "vim" },
+ },
+ workspace = {
+ library = {
+ [vim.fn.expand "$VIMRUNTIME/lua"] = true,
+ [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
+ [vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true,
+ [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true,
+ },
+ maxPreload = 100000,
+ preloadFileSize = 10000,
+ },
+ },
+ },
}
-- setup trouble
require("trouble").setup()
-require("trouble.providers.telescope")
-- setup keymap for telescope
local builtin = require('telescope.builtin')
diff --git a/configs/nvim/lazy-lock.json b/configs/nvim/lazy-lock.json
index 28efe5b..a68ca7c 100644
--- a/configs/nvim/lazy-lock.json
+++ b/configs/nvim/lazy-lock.json
@@ -6,16 +6,17 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
- "gitsigns.nvim": { "branch": "main", "commit": "983f1a216cca1a079399ba050bc4b9ce130de83a" },
+ "gitsigns.nvim": { "branch": "main", "commit": "fef5d90953f0a730483b44745fae5938ba8227f8" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"nvim-autopairs": { "branch": "master", "commit": "defad64afbf19381fe31488a7582bbac421d6e38" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
- "nvim-lspconfig": { "branch": "master", "commit": "0517d8522dcec286b1dba47aa3ee1ed8f523aed6" },
- "nvim-tree.lua": { "branch": "master", "commit": "ec33d4befa74205e09baf8bb4f90be5be754e6ab" },
- "nvim-web-devicons": { "branch": "master", "commit": "bc11ee2498de2310de5776477dd9dce65d03b464" },
+ "nvim-lspconfig": { "branch": "master", "commit": "d177ad277a638f262edb73c75ffe33e377b95dc5" },
+ "nvim-tree.lua": { "branch": "master", "commit": "94c7c810af205c0f00c8f105dcf490c8eb17658a" },
+ "nvim-web-devicons": { "branch": "master", "commit": "ecdeb4e2a4af34fc873bbfbf1f4c4e447e632255" },
"plenary.nvim": { "branch": "master", "commit": "a56bf0071bf63d35274fdc4738bb1e8821cfd2ea" },
- "telescope.nvim": { "branch": "master", "commit": "18f10f28007cb8b4d50324217349c3f568684be2" },
+ "telescope.nvim": { "branch": "master", "commit": "3d8e051c8c479c1e6e347bd9b1d3bdafdc4d5c5d" },
+ "toggleterm.nvim": { "branch": "main", "commit": "f2c720746238bc3ec620fe4bf92b58368317c266" },
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
diff --git a/configs/nvim/lua/plugins.lua b/configs/nvim/lua/plugins.lua
index cc2b31c..14f9903 100644
--- a/configs/nvim/lua/plugins.lua
+++ b/configs/nvim/lua/plugins.lua
@@ -7,9 +7,4 @@ return {
"hrsh7th/cmp-cmdline",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
- {
- "windwp/nvim-autopairs",
- event = "InsertEnter",
- opts = {}
- }
}
diff --git a/configs/nvim/lua/plugins/nvim-autopairs.lua b/configs/nvim/lua/plugins/nvim-autopairs.lua
index acfa202..b1cc486 100644
--- a/configs/nvim/lua/plugins/nvim-autopairs.lua
+++ b/configs/nvim/lua/plugins/nvim-autopairs.lua
@@ -1,2 +1,4 @@
-return { "windwp/nvim-autopairs", event =
-"InsertEnter", opts = {} }
+return {
+ "windwp/nvim-autopairs",
+ event = "InsertEnter",
+}
diff --git a/configs/nvim/lua/plugins/nvim-tree.lua b/configs/nvim/lua/plugins/nvim-tree.lua
index b3d3397..4ead963 100644
--- a/configs/nvim/lua/plugins/nvim-tree.lua
+++ b/configs/nvim/lua/plugins/nvim-tree.lua
@@ -1,2 +1,4 @@
-return { "nvim-tree/nvim-tree.lua", lazy = false, dependencies = {
- "nvim-tree/nvim-web-devicons", } }
+return {
+ "nvim-tree/nvim-tree.lua",
+ lazy = false,
+}
diff --git a/configs/nvim/lua/plugins/nvim-web-devicons.lua b/configs/nvim/lua/plugins/nvim-web-devicons.lua
new file mode 100644
index 0000000..39a5fd6
--- /dev/null
+++ b/configs/nvim/lua/plugins/nvim-web-devicons.lua
@@ -0,0 +1,3 @@
+return {
+ "nvim-tree/nvim-web-devicons"
+}
diff --git a/configs/nvim/lua/plugins/telescope.lua b/configs/nvim/lua/plugins/telescope.lua
index dc3d1ee..81b8784 100644
--- a/configs/nvim/lua/plugins/telescope.lua
+++ b/configs/nvim/lua/plugins/telescope.lua
@@ -1,4 +1,3 @@
return {
- 'nvim-telescope/telescope.nvim',
- dependencies = { "nvim-lua/plenary.nvim" }
+ 'nvim-telescope/telescope.nvim'
}
diff --git a/configs/nvim/lua/plugins/toggleterm-nvim.lua b/configs/nvim/lua/plugins/toggleterm-nvim.lua
new file mode 100644
index 0000000..4d67b4b
--- /dev/null
+++ b/configs/nvim/lua/plugins/toggleterm-nvim.lua
@@ -0,0 +1,3 @@
+return {
+ 'akinsho/toggleterm.nvim'
+}
diff --git a/configs/nvim/lua/plugins/tokyonight-nvim.lua b/configs/nvim/lua/plugins/tokyonight-nvim.lua
index 77ef02d..fc6d6cb 100644
--- a/configs/nvim/lua/plugins/tokyonight-nvim.lua
+++ b/configs/nvim/lua/plugins/tokyonight-nvim.lua
@@ -1 +1,5 @@
-return { "folke/tokyonight.nvim", lazy = false, priority = 1000, opts = {}, }
+return {
+ "folke/tokyonight.nvim",
+ lazy = false,
+ priority = 1000,
+}
diff --git a/configs/nvim/lua/plugins/trouble-nvim.lua b/configs/nvim/lua/plugins/trouble-nvim.lua
index 3ed7ee3..b84aa33 100644
--- a/configs/nvim/lua/plugins/trouble-nvim.lua
+++ b/configs/nvim/lua/plugins/trouble-nvim.lua
@@ -1,3 +1,3 @@
return {
- "folke/trouble.nvim",
+ "folke/trouble.nvim"
}
diff --git a/configs/nvim/lua/plugins/which-key-nvim.lua b/configs/nvim/lua/plugins/which-key-nvim.lua
index 11be1bd..31aca45 100644
--- a/configs/nvim/lua/plugins/which-key-nvim.lua
+++ b/configs/nvim/lua/plugins/which-key-nvim.lua
@@ -1,8 +1,3 @@
-return {
- "folke/which-key.nvim",
- event = "VeryLazy",
- init = function()
- vim.o.timeout = true
- vim.o.timeoutlen = 300
- end,
+return {
+ "folke/which-key.nvim"
}