Skip to content

Commit

Permalink
Update .config/nvim/init.lua
Browse files Browse the repository at this point in the history
Update .config/nvim/lua/plugins/Comment.lua
Update .config/nvim/lua/plugins/fzf.lua
Update .config/nvim/lua/plugins/gitsigns.lua
Update .config/nvim/lua/plugins/harpoon.lua
Update .config/nvim/lua/plugins/nvim-cmp.lua
Update .config/nvim/lua/plugins/nvim-lspconfig.lua
Update .config/nvim/lua/plugins/nvim-surround.lua
  • Loading branch information
Hyuga-Tsukui committed Nov 12, 2024
1 parent 786cdae commit a6e7531
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 17 deletions.
28 changes: 14 additions & 14 deletions dot_config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
if not vim.g.vscode then
require("core.options")
require("core.keymaps")
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("core.options")
require("core.keymaps")
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1

vim.opt.laststatus = 3
vim.opt.laststatus = 3

require("config.lazy")
require("config.lazy")

vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
return string.format("%s (%s: %s)", diagnostic.message, diagnostic.source, diagnostic.code)
end,
},
})
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
return string.format("%s (%s: %s)", diagnostic.message, diagnostic.source, diagnostic.code)
end,
},
})
end
2 changes: 1 addition & 1 deletion dot_config/nvim/lua/plugins/Comment.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
"numToStr/Comment.nvim",
event = "VeryLazy",
keys = { "gcc", "gbc", "gc", "gb" },
config = function()
require("Comment").setup()
end,
Expand Down
4 changes: 4 additions & 0 deletions dot_config/nvim/lua/plugins/fzf.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
return {
"ibhagwan/fzf-lua",
keys = {
"<C-p>",
"<C-r>",
},
config = function()
require("fzf-lua").setup({
keymap = {
Expand Down
7 changes: 7 additions & 0 deletions dot_config/nvim/lua/plugins/gitsigns.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
return {
"lewis6991/gitsigns.nvim",
event = { "BufRead", "BufNewFile" },
cond = function()
-- 現在のバッファのファイルタイプが特定のもの (例: NvimTree) でないことを確認
local exclude_filetypes = { "NvimTree" }
return not vim.tbl_contains(exclude_filetypes, vim.bo.filetype)
end,

config = function()
require("gitsigns").setup({
on_attach = function(bufnr)
Expand Down
4 changes: 4 additions & 0 deletions dot_config/nvim/lua/plugins/harpoon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
keys = {
"<leader>m",
"<C-e>",
},
config = function()
local harpoon = require("harpoon")
harpoon:setup()
Expand Down
2 changes: 1 addition & 1 deletion dot_config/nvim/lua/plugins/nvim-cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ return {
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
-- ["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
["<Tab>"] = vim.schedule_wrap(function(fallback)
if cmp.visible() and has_words_before() then
Expand Down
7 changes: 7 additions & 0 deletions dot_config/nvim/lua/plugins/nvim-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@ return {
require("mason").setup({})
end,
cmd = { "Mason" },
lazy = true,
},
{
"williamboman/mason-lspconfig.nvim",
config = function()
require("mason-lspconfig").setup({})
end,
lazy = true,
},
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
cond = function()
-- 現在のバッファのファイルタイプが特定のもの (例: NvimTree) でないことを確認
local exclude_filetypes = { "NvimTree" }
return not vim.tbl_contains(exclude_filetypes, vim.bo.filetype)
end,
config = function()
local lspconfig = require("lspconfig")
require("mason-lspconfig").setup_handlers({
Expand Down
2 changes: 1 addition & 1 deletion dot_config/nvim/lua/plugins/nvim-surround.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
keys = { "ys" },
config = function()
require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults
Expand Down

0 comments on commit a6e7531

Please sign in to comment.