Introducing muslim.nvim

12/15/2025

Github link: tajirhas9/muslim.nvim

السلام عليكم

As Muslim software engineers we spend hours in the editor. We read docs, ship features, and solve bugs — but the world of deadlines and sprints shouldn’t make us miss our prayers. That’s why I built muslim.nvim: a tiny, fast Neovim plugin that calculates Muslim prayer times and shows the remaining time until the current waqt right in your statusline (perfectly integrated with lualine). No context switching, no extra apps — just your editor gently reminding you when it’s time to pause, reflect, and pray.

Blog Logo for muslim.nvim

✨ Features

📦 Requriements

🚀 Installation

Install the plugin with your preferred package manager

{
"tajirhas9/muslim.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
-- OPTIONAL
"nvim-lualine/lualine.nvim"
}
}

⚙️ Configuration

muslim.nvim comes with the following defaults:

{
refresh = 1, -- Refresh interval in minutes to update prayer waqt times
latitude = nil, -- MANDATORY TO BE PROVIDED. Geolocation latitude of the place of calculation
longitude = nil, -- MANDATORY TO BE PROVIDED. Geolocation longitude of the place of calculation
utc_offset = 0, -- timezone, default is GMT+0
school = 'hanafi', -- school of thought
method = 'MWL', -- calculation method. default is Muslim World League
time_format = '12H', -- time display format: '12H' for 12-hour with AM/PM, '24h' for 24-hour
countdown_only = false, -- show only countdown to next prayer
offset = { -- per-prayer minute offsets to fine-tune calculated times
fajr = 0, -- negative values subtract, positive values add minutes
sunrise = 0,
dhuhr = 0,
asr = 0,
sunset = 0,
maghrib = 0,
isha = 0,
midnight = 0,
},
}

🛠️ Setup

local muslim = require("muslim")
muslim.setup({
latitude = 23.816237996387994,
longitude = 90.79664030627636,
timezone = 'Asia/Dhaka',
utc_offset = 6,
refresh = 5
})

🧭 Commands

muslim.nvim supports the following user commands.

CommandDescription
:PrayerTimesReturns a table with the waqt timestamps for the day

:PrayerTimes sample return value

|-------------------------|
| Waqt | Time |
|-------------------------|
| fajr | 05:05 AM |
| sunrise | 06:20 AM |
| dhuhr | 12:06 PM |
| asr | 04:15 PM |
| sunset | 05:53 PM |
| maghrib | 05:53 PM |
| isha | 07:03 PM |
| midnight | 12:06 AM |
|-------------------------|

🧰 Utility functions

Function nameDescription
prayer_timeReturns a formatted text. Shows remaining time for current waqt (if valid) and start time of next waqt
today_prayer_time_epochsReturns a table with all the waqt time (in epochs) for the day

These functions can be used to enhance the behavior of the plugin. For example, create a scheduler with vim.schedule and show the prayer time as a popup notification for certain warnings.

🧩 Integration with lualine

If you want the prayer times to appear in the statusline, you have to update your lualine configuration to add the following to the section of the lualine you want the text to be.

{ muslim.prayer_time, id = "muslim.nvim" }

🎨 Sample lualine configuration

To get something similar to the image above, the configuration can be as below:

require("lualine").setup({
sections = {
lualine_a = {
{ 'mode',
icons_enabled = true,
separator = { left = '' },
right_padding = 2
}
},
lualine_b = { { 'filename', path = 1 }, 'branch' },
lualine_c = { { clients_lsp } },
-- added muslim.nvim here
lualine_x = {
{ 'datetime', style = 'default' },
{ muslim.prayer_time, id = "muslim.nvim", color = { fg = colors.blue } }
},
lualine_y = { 'filetype', 'progress' },
lualine_z = {
{ 'location', separator = { right = '' }, left_padding = 2 },
},
}
})