Updated config

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2024-04-04 11:13:28 +02:00
parent 8832c1d7b8
commit df0da06a04
6 changed files with 32 additions and 20 deletions

View File

@@ -34,9 +34,13 @@ opt.incsearch = true
opt.termguicolors = true opt.termguicolors = true
opt.splitright = true
opt.splitbelow = true
opt.scrolloff = 8 opt.scrolloff = 8
opt.signcolumn = "yes" opt.signcolumn = "yes"
opt.isfname:append("@-@") opt.isfname:append("@-@")
opt.backspace = "indent,eol,start"
opt.updatetime = 50 opt.updatetime = 50
@@ -44,7 +48,7 @@ opt.updatetime = 50
if vim.fn.has("win32") == 1 then if vim.fn.has("win32") == 1 then
o.shell = "pwsh -nologo" o.shell = "pwsh -nologo"
o.shellcmdflag = o.shellcmdflag =
"-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;" "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;"
o.shellredir = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode" o.shellredir = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode"
o.shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode" o.shellpipe = "2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode"
o.shellquote = "" o.shellquote = ""

View File

@@ -54,8 +54,11 @@ local M = {
end, end,
desc = "Theme selector", desc = "Theme selector",
}, },
["<leader>hc"] = { ":nohl<CR>", desc = "Clear search highlights" },
}, },
vn = { vn = {
["<leader>+"] = { "<C-a>", desc = "Increment number" },
["<leader>-"] = { "<C-x>", desc = "Decrement number" },
["<leader>y"] = { [["+y]], desc = "Yank in to sys clipboard" }, ["<leader>y"] = { [["+y]], desc = "Yank in to sys clipboard" },
["<leader>d"] = { [["_d]], desc = "Actually deletes text" }, ["<leader>d"] = { [["_d]], desc = "Actually deletes text" },
}, },

View File

@@ -1,9 +1,7 @@
--- @type LazyPluginSpec --- @type LazyPluginSpec
return { return {
"williamboman/mason.nvim", "williamboman/mason.nvim",
build = function() build = "MasonUpdate",
pcall(vim.cmd, "MasonUpdate")
end,
dependencies = { dependencies = {
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
"jayp0521/mason-null-ls.nvim", "jayp0521/mason-null-ls.nvim",
@@ -13,7 +11,15 @@ return {
local mason_lspconfig = require("mason-lspconfig") local mason_lspconfig = require("mason-lspconfig")
local mason_null_ls = require("mason-null-ls") local mason_null_ls = require("mason-null-ls")
mason.setup() mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
mason_lspconfig.setup({ mason_lspconfig.setup({
ensure_installed = { ensure_installed = {

View File

@@ -9,7 +9,12 @@ return {
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
ependencies = { "nvim-lua/plenary.nvim" }, ependencies = { "nvim-lua/plenary.nvim" },
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = true, config = function()
local todo = require("todo-comments")
todo.setup({})
vim.keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<CR>", { noremap = true, silent = true })
end,
}, },
{ {
"folke/trouble.nvim", "folke/trouble.nvim",

View File

@@ -5,35 +5,29 @@ return {
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-telescope/telescope-file-browser.nvim", "nvim-telescope/telescope-file-browser.nvim",
"nvim-telescope/telescope-project.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, { "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
}, },
config = function() config = function()
local telescope = require("telescope") local telescope = require("telescope")
local command = { "fd", "-I", "-H", "--type", "file" } local command = { "fd", "-I", "-H", "--type", "file" }
local ignored = { "node_modules", ".git", "dist" } local ignored = { "node_modules", ".git" }
for i, v in ipairs(ignored) do for i, v in ipairs(ignored) do
table.insert(command, "--exclude") table.insert(command, "--exclude")
table.insert(command, v) table.insert(command, v)
end end
telescope.load_extension("project")
telescope.setup({ telescope.setup({
defaults = {
path_display = { "smart" },
},
pickers = { pickers = {
find_files = { find_files = {
find_command = command, find_command = command,
}, },
}, },
extensions = { extensions = {
project = {
-- sync_with_nvim_tree = true,
-- on_project_selected = function()
-- require("nvim-tree.api").tree.change_root(vim.fn.getcwd())
-- end,
},
file_browser = { file_browser = {
hidden = { hidden = {
file_browser = true, file_browser = true,
@@ -41,10 +35,10 @@ return {
}, },
}, },
fzf = { fzf = {
fuzzy = true, -- false will only do exact matching fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case" case_mode = "smart_case", -- or "ignore_case" or "respect_case"
}, },
}, },
}) })

View File

@@ -47,7 +47,7 @@ return {
name = "project", name = "project",
}, },
h = { h = {
name = "theme", name = "highlights",
}, },
}, },
}) })