Skip to content

Commit 012d0af

Browse files
hulk510claude
andauthored
feat(nvim): add bufferline, update conform and UI settings (#48)
## Summary - bufferline.nvim を追加(タブ風バッファ表示、LSP diagnostics 表示対応) - conform.nvim を更新: eslint_d 追加、biome-check 使用、非推奨の `lsp_fallback` を `lsp_format = "fallback"` に修正 - Catppuccin に bufferline integration を有効化 - lualine の priority を調整(bufferline の後にロード) ## Test plan - [ ] bufferline がバッファ2つ以上で表示されること - [ ] LSP diagnostics がバッファタブに表示されること - [ ] `<leader>lf` でフォーマットが動作すること - [ ] Catppuccin テーマが bufferline に適用されていること 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f2a6d71 commit 012d0af

File tree

4 files changed

+47
-15
lines changed

4 files changed

+47
-15
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
-- ===================================================================
2+
-- bufferline.nvim: バッファをタブ風に上部表示
3+
-- モダンなタブUI、Catppuccin統合
4+
-- ===================================================================
5+
6+
return {
7+
"akinsho/bufferline.nvim",
8+
version = "*",
9+
dependencies = { "nvim-tree/nvim-web-devicons" },
10+
event = "VeryLazy",
11+
config = function()
12+
require("bufferline").setup({
13+
options = {
14+
diagnostics = "nvim_lsp",
15+
diagnostics_indicator = function(count, level)
16+
local icon = level:match("error") and " " or " "
17+
return " " .. icon .. count
18+
end,
19+
separator_style = "thin",
20+
show_buffer_close_icons = false,
21+
show_close_icon = false,
22+
always_show_bufferline = false, -- バッファが2つ以上で表示
23+
offsets = {
24+
{
25+
filetype = "oil",
26+
text = "File Explorer",
27+
highlight = "Directory",
28+
text_align = "left",
29+
},
30+
},
31+
},
32+
})
33+
end,
34+
-- キーマップは keymaps.lua に集約
35+
}

dot_config/nvim/lua/plugins/colorscheme.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ return {
3636
harpoon = true,
3737
mason = true,
3838
noice = true,
39+
bufferline = true,
3940
flash = true,
4041
native_lsp = {
4142
enabled = true,

dot_config/nvim/lua/plugins/conform.lua

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ return {
1111
{
1212
"<leader>lf",
1313
function()
14-
require("conform").format({ async = true, lsp_fallback = true })
14+
require("conform").format({ async = true, lsp_format = "fallback" })
1515
end,
1616
mode = { "n", "v" },
1717
desc = "Format buffer",
@@ -26,14 +26,15 @@ return {
2626
-- Python
2727
python = { "isort", "black" },
2828

29-
-- JavaScript/TypeScript (biome優先、なければprettier)
30-
javascript = { "biome", "prettier", stop_after_first = true },
31-
typescript = { "biome", "prettier", stop_after_first = true },
32-
javascriptreact = { "biome", "prettier", stop_after_first = true },
33-
typescriptreact = { "biome", "prettier", stop_after_first = true },
29+
-- JavaScript/TypeScript
30+
-- eslint_d (auto-fix: 未使用import削除等) → biome-check or prettier (format + organize imports)
31+
javascript = { "eslint_d", "biome-check", "prettier" },
32+
typescript = { "eslint_d", "biome-check", "prettier" },
33+
javascriptreact = { "eslint_d", "biome-check", "prettier" },
34+
typescriptreact = { "eslint_d", "biome-check", "prettier" },
3435

3536
-- Vue
36-
vue = { "biome", "prettier", stop_after_first = true },
37+
vue = { "eslint_d", "biome-check", "prettier" },
3738

3839
-- Web
3940
html = { "prettier" },
@@ -67,16 +68,11 @@ return {
6768

6869
-- デフォルトオプション
6970
default_format_opts = {
70-
lsp_fallback = true, -- フォーマッターがない場合はLSPを使用
71+
lsp_format = "fallback", -- フォーマッターがない場合はLSPを使用
7172
},
7273

73-
-- 保存時に自動フォーマット(無効化推奨、手動で<leader>lfを使う)
74+
-- 保存時の自動フォーマットは無効(手動で<leader>lfを使う)
7475
format_on_save = nil,
75-
-- もし自動フォーマットを有効にしたい場合は以下のコメントを外す:
76-
-- format_on_save = {
77-
-- timeout_ms = 500,
78-
-- lsp_fallback = true,
79-
-- },
8076

8177
-- フォーマットが適用されたときの通知
8278
notify_on_error = true,

dot_config/nvim/lua/plugins/ui.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ return {
1010
{
1111
"nvim-lualine/lualine.nvim",
1212
lazy = false,
13-
priority = 999,
13+
priority = 900,
1414
dependencies = { "nvim-tree/nvim-web-devicons" },
1515
config = function()
1616
require("lualine").setup({

0 commit comments

Comments
 (0)